From: Nick Ing-Simmons Date: Mon, 4 Mar 2002 14:08:38 +0000 (+0000) Subject: Integrate mainline - all tests pass - some noise from threads X-Git-Tag: accepted/trunk/20130322.191538~23899^2~314 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1caf9e2ce998bccd33c2c483486736e548a9f722;p=platform%2Fupstream%2Fperl.git Integrate mainline - all tests pass - some noise from threads av_simple (SuSE7.3). p4raw-id: //depot/perlio@14992 --- 1caf9e2ce998bccd33c2c483486736e548a9f722 diff --cc lib/Tie/File/t/01_gen.t index d69d232,e383b7f..d0ccb71 --- a/lib/Tie/File/t/01_gen.t +++ b/lib/Tie/File/t/01_gen.t @@@ -76,11 -83,20 +83,16 @@@ sub check_contents # now check FETCH: my $good = 1; + my $msg; for (0.. $#c) { - $good = 0 unless $a[$_] eq "$c[$_]$/"; + unless ($a[$_] eq "$c[$_]$/") { + $msg = "expected $c[$_]$/, got $a[$_]"; + $msg =~ s{$/}{\\n}g; + $good = 0; + } } - print (($open && $good) ? "ok $N\n" : "not ok $N # fetch @c\n"); + print $good ? "ok $N\n" : "not ok $N # $msg\n"; $N++; - - print $o->_check_integrity($file, $ENV{INTEGRITY}) - ? "ok $N\n" : "not ok $N\n"; - $N++; } END { diff --cc lib/Tie/File/t/10_splice_rs.t index 94f3d01,aa33bcf..9e0788c --- a/lib/Tie/File/t/10_splice_rs.t +++ b/lib/Tie/File/t/10_splice_rs.t @@@ -136,6 -138,40 +138,40 @@@ check_contents("rec0blahrec1blah") splice(@a, 0, 17); check_contents(""); + # (89-92) In the past, splicing past the end was not correctly detected + # (1.14) + splice(@a, 89, 3); + check_contents(""); + splice(@a, @a, 3); + check_contents(""); + + # (93-96) Also we did not emulate splice's freaky behavior when inserting + # past the end of the array (1.14) + splice(@a, 89, 0, "I", "like", "pie"); + check_contents("Iblahlikeblahpieblah"); + splice(@a, 89, 0, "pie pie pie"); + check_contents("Iblahlikeblahpieblahpie pie pieblah"); + + # (97) Splicing with too large a negative number should be fatal -# This test ignored because it causes 5.6.1 and 5.7.3 to dump core ++# This test ignored because it causes 5.6.1 and 5.7.2 to dump core + # NOT MY FAULT -if ($] < 5.006 || $] > 5.007003) { ++if ($] < 5.006 || $] > 5.007002) { + eval { splice(@a, -7, 0) }; + print $@ =~ /^Modification of non-creatable array value attempted, subscript -7/ + ? "ok $N\n" : "not ok $N \# \$\@ was '$@'\n"; + } else { - print "ok $N \# skipped (5.6.0 through 5.7.3 dump core here.)\n"; ++ print "ok $N \# skipped (5.6.0 through 5.7.2 dump core here.)\n"; + } + $N++; + + # (98-101) Test default arguments + splice @a, 0, 0, (0..11); + splice @a, 4; + check_contents("0blah1blah2blah3blah"); + splice @a; + check_contents(""); + + sub init_file { my $data = shift; open F, "> $file" or die $!;