X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=t%2F16-packages.t;h=6c09bcff5ea2191a8272e988edf4013a61474510;hb=a032022a32bbc0d1ed46990ca8e79889ce41cb1f;hp=84a879037869cdb4871fe555d3854b0444841be3;hpb=c74e32179362609920e502138a33b93f177990c4;p=ZOOM-Perl-moved-to-github.git diff --git a/t/16-packages.t b/t/16-packages.t index 84a8790..6c09bcf 100644 --- a/t/16-packages.t +++ b/t/16-packages.t @@ -1,4 +1,4 @@ -# $Id: 16-packages.t,v 1.7 2005-12-09 10:17:35 mike Exp $ +# $Id: 16-packages.t,v 1.12 2006-04-12 12:30:09 mike Exp $ # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 16-packages.t' @@ -19,10 +19,8 @@ use Test::More tests => 40; BEGIN { use_ok('Net::Z3950::ZOOM') }; -# For now, use a local database: later establish a public one for this. # We will create, and destroy, a new database with a random name -my $host = "localhost:9999"; -#my $host = "indexdata.com/gils"; +my $host = "test.indexdata.com:2118"; my $dbname = join("", map { chr(ord("a") + int(rand(26))) } 1..10); # Connect anonymously, and expect this to fail @@ -67,9 +65,8 @@ count_hits($conn, "the", 0, 2); # Now drop the newly-created database dropdb($conn, $dbname, 0); -# A second dropping should fail, but does not do so -- I think that -# "drop" is an always-"successful" no-op. Yuck. -dropdb($conn, $dbname, 0); +# A second dropping should fail, as the database is no longer there. +dropdb($conn, $dbname, 10004); sub makeconn { @@ -133,7 +130,6 @@ sub dropdb { my $p = Net::Z3950::ZOOM::connection_package($conn, $o); # No need to keep ok()ing this, or checking the option-setting Net::Z3950::ZOOM::package_option_set($p, databaseName => $dbname); - Net::Z3950::ZOOM::package_send($p, "drop"); my($errcode, $errmsg, $addinfo) = (undef, "dummy", "dummy"); $errcode = Net::Z3950::ZOOM::connection_error($conn, $errmsg, $addinfo);