-# $Id: 16-packages.t,v 1.6 2005-12-07 17:46:00 mike Exp $
+# $Id: 16-packages.t,v 1.10 2005-12-14 09:30:58 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'
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
count_hits($conn, "the", 0, 1);
# Add it again record with different ID => new copy added
-### For some reason, this does not work
updaterec($conn, 2, content_of("samples/records/esdd0006.grs"), 0);
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.
+# A second dropping should fail, as the database is no longer there.
+### But at present, it's "always successful" (though not really)
dropdb($conn, $dbname, 0);
# 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");
+ ### Don't send the package at the moment -- it corrupts Zebra
+ #Net::Z3950::ZOOM::package_send($p, "drop");
my($errcode, $errmsg, $addinfo) = (undef, "dummy", "dummy");
$errcode = Net::Z3950::ZOOM::connection_error($conn, $errmsg, $addinfo);
ok($errcode == $expected_error,