More explicit report when scan identity test fails
[ZOOM-Perl-moved-to-github.git] / t / 15-scan.t
index 7bbbd69..e2904a3 100644 (file)
@@ -1,5 +1,3 @@
-# $Id: 15-scan.t,v 1.14 2007-08-16 17:19:35 mike Exp $
-
 # Before `make install' is performed this script should be runnable with
 # `make test'. After `make install' it should work as `perl 15-scan.t'
 
@@ -16,6 +14,7 @@ my $conn = Net::Z3950::ZOOM::connection_new($host, 0);
 $errcode = Net::Z3950::ZOOM::connection_error($conn, $errmsg, $addinfo);
 ok($errcode == 0, "connection to '$host'");
 
+Net::Z3950::ZOOM::connection_option_set($conn, number => 10);
 my($ss, $n) = scan($conn, 0, "w", 10);
 
 my @terms = ();
@@ -32,7 +31,7 @@ foreach my $i (1 .. $n) {
     my $disp = Net::Z3950::ZOOM::scanset_display_term($ss, $i-1, $occ, $len);
     ok(defined $disp && $len eq length($disp),
        "display term $i of $n: '$disp' ($occ occurences)");
-    ok($disp eq $term, "display term $i identical to term");
+    ok($disp eq $term, "display term $i ($disp) identical to term ($term)");
 }
 
 Net::Z3950::ZOOM::scanset_destroy($ss);