diff options
author | Paul Marquess <pmarquess@bfsec.bt.co.uk> | 1997-01-12 15:09:33 +0000 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-01-16 07:24:00 +1200 |
commit | 6250ba0abb669fbb694bb58699aa811bdf9bfa1f (patch) | |
tree | 620cd05498f3948ee14704d27bc74bb6b36d895c | |
parent | 0853649b1858fb78ece1fdef84c96fd9614932e7 (diff) | |
download | perl-6250ba0abb669fbb694bb58699aa811bdf9bfa1f.tar.gz |
patch for db-recno.t
Chip,
here is a patch for db-recno.t which makes it print a diagnostic
message when any of test 51,53 or 55 fail.
p5p-msgid: <9701121509.AA11147@claudius.bfsec.bt.co.uk>
-rwxr-xr-x | t/lib/db-recno.t | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/t/lib/db-recno.t b/t/lib/db-recno.t index 6027b6fa95..da3edbf45f 100755 --- a/t/lib/db-recno.t +++ b/t/lib/db-recno.t @@ -21,6 +21,24 @@ sub ok print "not " unless $result ; print "ok $no\n" ; + + return $result ; +} + +sub bad_one +{ + print <<EOM unless $bad_ones++ ; +# +# Some older versions of Berkeley DB will fail tests 51, 53 and 55. +# +# You can safely ignore the errors if you're never going to use the +# broken functionality (recno databases with a modified bval). +# Otherwise you'll have to upgrade your DB library. +# +# If you want to upgrade Berkeley DB, the most recent version is 1.85. +# Check out http://www.bostic.com/db for more details. +# +EOM } print "1..55\n"; @@ -190,8 +208,8 @@ unlink $Dfile; $h[3] = "ghi" ; untie @h ; my $x = `cat $Dfile` ; - ok(49, $x eq "abc\ndef\n\nghi\n") ; unlink $Dfile; + ok(49, $x eq "abc\ndef\n\nghi\n") ; } { @@ -206,8 +224,10 @@ unlink $Dfile; $h[3] = "ghi" ; untie @h ; my $x = `cat $Dfile` ; - ok(51, $x eq "abc-def--ghi-") ; unlink $Dfile; + my $ok = ($x eq "abc-def--ghi-") ; + bad_one() unless $ok ; + ok(51, $ok) ; } { @@ -223,8 +243,10 @@ unlink $Dfile; $h[3] = "ghi" ; untie @h ; my $x = `cat $Dfile` ; - ok(53, $x eq "abc def ghi ") ; unlink $Dfile; + my $ok = ($x eq "abc def ghi ") ; + bad_one() unless $ok ; + ok(53, $ok) ; } { @@ -241,8 +263,10 @@ unlink $Dfile; $h[3] = "ghi" ; untie @h ; my $x = `cat $Dfile` ; - ok(55, $x eq "abc--def-------ghi--") ; unlink $Dfile; + my $ok = ($x eq "abc--def-------ghi--") ; + bad_one() unless $ok ; + ok(55, $ok) ; } exit ; |