Fix #14957.
[p5sagit/p5-mst-13.2.git] / ext / DB_File / t / db-recno.t
index 339baec..f077252 100755 (executable)
@@ -93,8 +93,8 @@ sub bad_one
 {
     print STDERR <<EOM unless $bad_ones++ ;
 #
-# Some older versions of Berkeley DB version 1 will fail tests 51,
-# 53 and 55.
+# Some older versions of Berkeley DB version 1 will fail tests 61,
+# 63 and 65.
 #
 # You can safely ignore the errors if you're never going to use the
 # broken functionality (recno databases with a modified bval). 
@@ -1080,6 +1080,7 @@ sub test_splice {
     my ($s_r, $s_error, @s_warnings);
 
     my $gather_warning = sub { push @s_warnings, $_[0] };
+    $offset = $#array if $offset and $offset > @array;
     if ($context eq 'list') {
        my @r;
        eval {
@@ -1118,6 +1119,7 @@ sub test_splice {
     # Now do the same for DB_File's version of splice
     my ($ms_r, $ms_error, @ms_warnings);
     $gather_warning = sub { push @ms_warnings, $_[0] };
+    $offset = $#h if $offset and $offset > @h;
     if ($context eq 'list') {
        my @r;
        eval {