X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=t%2F1-Net-Z3950-ZOOM.t;h=a23ba4884d96d45f8082379cd75572693dd11160;hb=9055af7e8ca536c22e1313bd33abe5cd0d04b738;hp=74e3990ae14b55541222585e48478f424c170920;hpb=c0f4fac214101d6c490889e88fc036b5efa933d1;p=ZOOM-Perl-moved-to-github.git diff --git a/t/1-Net-Z3950-ZOOM.t b/t/1-Net-Z3950-ZOOM.t index 74e3990..a23ba48 100644 --- a/t/1-Net-Z3950-ZOOM.t +++ b/t/1-Net-Z3950-ZOOM.t @@ -1,5 +1,3 @@ -# $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' @@ -19,8 +17,10 @@ my($errcode, $errmsg, $addinfo) = (undef, "dummy", "dummy"); 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: \$conn=$conn, errcode=$errcode, addinfo=$addinfo"); +# For some reason, Red Hat signals this as a TIMEOUT rather than a CONNECT +ok(($errcode == Net::Z3950::ZOOM::ERROR_CONNECT && $addinfo eq $host) || + ($errcode == Net::Z3950::ZOOM::ERROR_TIMEOUT && $addinfo eq ""), + "connection to non-existent host '$host' fails: errcode=$errcode, addinfo=$addinfo"); $host = "z3950.indexdata.com/gils"; $conn = Net::Z3950::ZOOM::connection_new($host, 0);