X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=t%2F19-events.t;h=3c286b23c96bd4b5eaf58f4dbd7a5a6bbbf9506c;hb=ecc0ec8f7c966c6566128351e46b5e0ba92d17d9;hp=d11bf8418a357631244219776dbcab3e90966b17;hpb=52f0d52f8f3c183d567856bead4edd35fa976bf9;p=ZOOM-Perl-moved-to-github.git diff --git a/t/19-events.t b/t/19-events.t index d11bf84..3c286b2 100644 --- a/t/19-events.t +++ b/t/19-events.t @@ -1,20 +1,21 @@ -# $Id: 19-events.t,v 1.4 2006-04-12 11:59:20 mike Exp $ - # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 19-events.t' use strict; use warnings; -use Test::More tests => 22; +use Test::More tests => 23; BEGIN { use_ok('Net::Z3950::ZOOM') }; +ok(Net::Z3950::ZOOM::event_str(Net::Z3950::ZOOM::EVENT_CONNECT) eq "connect", + "connect event properly translated"); + my($errcode, $errmsg, $addinfo) = (undef, "dummy", "dummy"); my $options = Net::Z3950::ZOOM::options_create(); Net::Z3950::ZOOM::options_set($options, async => 1); -my $host = "indexdata.com/gils"; +my $host = "z3950.indexdata.com/gils"; my $conn = Net::Z3950::ZOOM::connection_create($options); Net::Z3950::ZOOM::connection_connect($conn, $host, 0); $errcode = Net::Z3950::ZOOM::connection_error($conn, $errmsg, $addinfo); @@ -29,8 +30,10 @@ ok($val == -2, "non-array reference argument rejected"); $val = Net::Z3950::ZOOM::event([]); ok($val == -3, "empty array reference argument rejected"); -$val = Net::Z3950::ZOOM::event([1..32767]); -ok($val == -4, "huge array reference argument rejected"); +# The old test for giant array reference can't be done now that the +# corresponding array internal to the glue-code is allocated +# dynamically. +ok(1, "huge array reference argument rejected"); # Test the sequence of events that come from just creating the # connection: there's the physical connect; the sending the Init