X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=t%2F1-Net-Z3950-ZOOM.t;h=74e3990ae14b55541222585e48478f424c170920;hb=c0f4fac214101d6c490889e88fc036b5efa933d1;hp=bab5712402687d1a99d2d81527ec96d7d8602832;hpb=18c49becbb590b5b9b03d7ee5edfe143d6d63c8a;p=ZOOM-Perl-moved-to-github.git diff --git a/t/1-Net-Z3950-ZOOM.t b/t/1-Net-Z3950-ZOOM.t index bab5712..74e3990 100644 --- a/t/1-Net-Z3950-ZOOM.t +++ b/t/1-Net-Z3950-ZOOM.t @@ -1,4 +1,4 @@ -# $Id: 1-Net-Z3950-ZOOM.t,v 1.16 2007-09-14 10:36:13 mike Exp $ +# $Id: 1-Net-Z3950-ZOOM.t,v 1.17 2008-05-14 13:32:55 mike Exp $ # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 1-Net-Z3950-ZOOM.t' @@ -20,7 +20,7 @@ my $host = "no.such.host"; my $conn = Net::Z3950::ZOOM::connection_new($host, 0); $errcode = Net::Z3950::ZOOM::connection_error($conn, $errmsg, $addinfo); ok($errcode == Net::Z3950::ZOOM::ERROR_CONNECT && $addinfo eq $host, - "connection to non-existent host '$host' fails"); + "connection to non-existent host '$host' fails: \$conn=$conn, errcode=$errcode, addinfo=$addinfo"); $host = "z3950.indexdata.com/gils"; $conn = Net::Z3950::ZOOM::connection_new($host, 0); @@ -82,11 +82,10 @@ my $n = Net::Z3950::ZOOM::resultset_size($rs); ok($n == 1, "found 1 record as expected"); my $rec = Net::Z3950::ZOOM::resultset_record($rs, 0); -my $len = 0; -my $data = Net::Z3950::ZOOM::record_get($rec, "render", $len); +my $data = Net::Z3950::ZOOM::record_get($rec, "render"); ok($data =~ /^245 +\$a ISOTOPIC DATES OF ROCKS AND MINERALS$/m, "rendered record has expected title"); -my $raw = Net::Z3950::ZOOM::record_get($rec, "raw", $len); +my $raw = Net::Z3950::ZOOM::record_get($rec, "raw"); ok($raw =~ /^00966n/, "raw record contains expected header"); Net::Z3950::ZOOM::resultset_destroy($rs);