-# $Id: 1-Net-Z3950-ZOOM.t,v 1.3 2005-10-12 13:26:26 mike Exp $
+# $Id: 1-Net-Z3950-ZOOM.t,v 1.5 2005-10-12 16:13:34 mike Exp $
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl Net-Z3950-ZOOM.t'
# change 'tests => 1' to 'tests => last_test_to_print';
use strict;
-use Test::More tests => 11;
+use Test::More tests => 12;
BEGIN { use_ok('Net::Z3950::ZOOM') };
#########################
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
+my $msg = Net::Z3950::ZOOM::diag_str(Net::Z3950::ZOOM::ERROR_INVALID_QUERY);
+ok($msg eq "Invalid query", "diagnostic string lookup works");
+
my($errcode, $errmsg, $addinfo) = (undef, "dummy", "dummy");
my $host = "no.such.host";
"search for invalid query '$query' fails");
$query = '@attr 1=4 minerals';
-my $rs = Net::Z3950::ZOOM::connection_search_pqf($conn, $query);
+$rs = Net::Z3950::ZOOM::connection_search_pqf($conn, $query);
$errcode = Net::Z3950::ZOOM::connection_error($conn, $errmsg, $addinfo);
ok($errcode == 0, "search for '$query' OK");