projects
/
ZOOM-Perl-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d70e20b
)
Tweaks to facilitate better tests to come.
author
mike
<mike>
Fri, 7 Apr 2006 11:47:33 +0000
(11:47 +0000)
committer
mike
<mike>
Fri, 7 Apr 2006 11:47:33 +0000
(11:47 +0000)
t/19-events.t
patch
|
blob
|
history
diff --git
a/t/19-events.t
b/t/19-events.t
index
690fcff
..
45c7f01
100644
(file)
--- a/
t/19-events.t
+++ b/
t/19-events.t
@@
-1,4
+1,4
@@
-# $Id: 19-events.t,v 1.1 2006-04-06 12:50:19 mike Exp $
+# $Id: 19-events.t,v 1.2 2006-04-07 11:47:33 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'
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl 19-events.t'
@@
-11,12
+11,15
@@
BEGIN { use_ok('Net::Z3950::ZOOM') };
my($errcode, $errmsg, $addinfo) = (undef, "dummy", "dummy");
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 = "indexdata.com/gils";
-my $conn = Net::Z3950::ZOOM::connection_new($host, 0);
+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);
ok($errcode == 0, "connection to '$host'");
$errcode = Net::Z3950::ZOOM::connection_error($conn, $errmsg, $addinfo);
ok($errcode == 0, "connection to '$host'");
-#my $options = Net::Z3950::ZOOM::options_create();
my $val = Net::Z3950::ZOOM::event(1);
ok($val == -1, "non-reference argument rejected");
my $val = Net::Z3950::ZOOM::event(1);
ok($val == -1, "non-reference argument rejected");
@@
-30,6
+33,6
@@
$val = Net::Z3950::ZOOM::event([1..32767]);
ok($val == -4, "huge array reference argument rejected");
$val = Net::Z3950::ZOOM::event([$conn]);
ok($val == -4, "huge array reference argument rejected");
$val = Net::Z3950::ZOOM::event([$conn]);
-ok($val == 0, "call with single connection does nothing");
+ok($val == 1, "call with an good connection returns its index");
### Now we need to actually do something.
### Now we need to actually do something.