From 51ff9c6cc88bb648e65cfb405f81b8689f61aadc Mon Sep 17 00:00:00 2001 From: mike Date: Tue, 11 Oct 2005 11:06:16 +0000 Subject: [PATCH] Repace ZOOM.t with Net-Z3950-ZOOM.t Functionally equivalent. --- t/Net-Z3950-ZOOM.t | 36 ++++++++++++++++++++++++++++++++++++ t/ZOOM.t | 36 ------------------------------------ 2 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 t/Net-Z3950-ZOOM.t delete mode 100644 t/ZOOM.t diff --git a/t/Net-Z3950-ZOOM.t b/t/Net-Z3950-ZOOM.t new file mode 100644 index 0000000..6f2d51c --- /dev/null +++ b/t/Net-Z3950-ZOOM.t @@ -0,0 +1,36 @@ +# 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 Test::More tests => 1; +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 $host = "localhost"; +my $port = 3950; +my $errcode; +my($errmsg, $addinfo) = ("dummy", "dummy"); + +my $conn = Net::Z3950::ZOOM::ZOOM_connection_new($host, $port); +if (($errcode = Net::Z3950::ZOOM::ZOOM_connection_error($conn, $errmsg, $addinfo)) != 0) { + die("Can't connect to host '$host', port '$port': ", + "errcode='$errcode', errmsg='$errmsg', addinfo='$addinfo'"); +} + +my $query = '@attr 1=4 taylor'; +my $rs = Net::Z3950::ZOOM::ZOOM_connection_search_pqf($conn, $query); +if (($errcode = Net::Z3950::ZOOM::ZOOM_connection_error($conn, $errmsg, $addinfo)) != 0) { + die("Can't search for '$query': ", + "errcode='$errcode', errmsg='$errmsg', addinfo='$addinfo'"); +} + +print STDERR "Result count: ", Net::Z3950::ZOOM::ZOOM_resultset_size($rs), "\n"; +Net::Z3950::ZOOM::ZOOM_resultset_destroy($rs); +Net::Z3950::ZOOM::ZOOM_connection_destroy($conn); diff --git a/t/ZOOM.t b/t/ZOOM.t deleted file mode 100644 index a253209..0000000 --- a/t/ZOOM.t +++ /dev/null @@ -1,36 +0,0 @@ -# Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl ZOOM.t' - -######################### - -# change 'tests => 1' to 'tests => last_test_to_print'; - -use Test::More tests => 1; -BEGIN { use_ok('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 $host = "localhost"; -my $port = 3950; -my $errcode; -my($errmsg, $addinfo) = ("dummy", "dummy"); - -my $conn = ZOOM::ZOOM_connection_new($host, $port); -if (($errcode = ZOOM::ZOOM_connection_error($conn, $errmsg, $addinfo)) != 0) { - die("Can't connect to host '$host', port '$port': ", - "errcode='$errcode', errmsg='$errmsg', addinfo='$addinfo'"); -} - -my $query = '@attr 1=4 taylor'; -my $rs = ZOOM::ZOOM_connection_search_pqf($conn, $query); -if (($errcode = ZOOM::ZOOM_connection_error($conn, $errmsg, $addinfo)) != 0) { - die("Can't search for '$query': ", - "errcode='$errcode', errmsg='$errmsg', addinfo='$addinfo'"); -} - -print STDERR "Result count: ", ZOOM::ZOOM_resultset_size($rs), "\n"; -ZOOM::ZOOM_resultset_destroy($rs); -ZOOM::ZOOM_connection_destroy($conn); -- 1.7.10.4