5 BEGIN { $| = 1; print "1..13\n"; }
6 END {print "not ok 1\n" unless $loaded;}
14 # Test ISBN validation
19 foreach $isbn ('0836213092','087784805X','087784805x','1878685899') {
20 PrintNextTestResult ( &checkvalidisbn($isbn), "Good ISBN: $isbn" )
24 foreach $isbn ('0836213192','087784804X','087784806x','1878685898',
25 '', ' ', 'abc', '1234567890123') {
26 PrintNextTestResult ( ! &checkvalidisbn($isbn), "Bad ISBN: $isbn" )
31 #-----------------------
32 sub PrintNextTestResult {
33 # modifies global var $TestCount
34 my ($ThisTestResult, $TestComment )=@_;
38 if ( $ThisTestResult ) {
39 print "ok $TestCount\n";
41 print STDERR "\nTest failed: $TestComment\n";
42 print "not ok $TestCount\n";
45 } # sub PrintNextTestResult
47 #-----------------------
49 # Revision 1.2 2002/06/20 18:18:06 tonnesen
50 # 47 files to go, 47 files to go, take one down, pass it around...
53 # Revision 1.1.2.1 2002/06/20 15:19:34 amillar
54 # Test valid ISBN numbers in Input.pm