projects
/
ZOOM-Perl-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ae8156e
)
Add diag_str() test.
author
mike
<mike>
Wed, 12 Oct 2005 16:13:34 +0000
(16:13 +0000)
committer
mike
<mike>
Wed, 12 Oct 2005 16:13:34 +0000
(16:13 +0000)
t/1-Net-Z3950-ZOOM.t
patch
|
blob
|
history
t/2-ZOOM.t
patch
|
blob
|
history
diff --git
a/t/1-Net-Z3950-ZOOM.t
b/t/1-Net-Z3950-ZOOM.t
index
a35894e
..
facf828
100644
(file)
--- 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.4 2005-10-12 14:36:17 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'
# 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'
@@
-8,7
+8,7
@@
# change 'tests => 1' to 'tests => last_test_to_print';
use strict;
# 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') };
#########################
BEGIN { use_ok('Net::Z3950::ZOOM') };
#########################
@@
-16,6
+16,9
@@
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.
# 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";
my($errcode, $errmsg, $addinfo) = (undef, "dummy", "dummy");
my $host = "no.such.host";
diff --git
a/t/2-ZOOM.t
b/t/2-ZOOM.t
index
98d4ded
..
2caf9e6
100644
(file)
--- a/
t/2-ZOOM.t
+++ b/
t/2-ZOOM.t
@@
-1,4
+1,4
@@
-# $Id: 2-ZOOM.t,v 1.3 2005-10-12 14:31:53 mike Exp $
+# $Id: 2-ZOOM.t,v 1.4 2005-10-12 16:13:38 mike Exp $
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl ZOOM.t'
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl ZOOM.t'
@@
-8,7
+8,7
@@
# change 'tests => 1' to 'tests => last_test_to_print';
use strict;
# change 'tests => 1' to 'tests => last_test_to_print';
use strict;
-use Test::More tests => 11;
+use Test::More tests => 12;
BEGIN { use_ok('ZOOM') };
#########################
BEGIN { use_ok('ZOOM') };
#########################
@@
-16,6
+16,9
@@
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.
# 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 = ZOOM::diag_str(ZOOM::Error::INVALID_QUERY);
+ok($msg eq "Invalid query", "diagnostic string lookup works");
+
my $host = "no.such.host";
my $conn;
eval { $conn = new ZOOM::Connection($host, 0) };
my $host = "no.such.host";
my $conn;
eval { $conn = new ZOOM::Connection($host, 0) };