From 4c6e520c519f616fb266538907c9d81f937eb831 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Fri, 27 Feb 2004 12:05:30 +0000 Subject: Integrate: [ 22337] fix write test: -small_number may be displayed as 00.00 or -0.00 [ 22343] -Dx could coredump on threaded builds because consts are now stored in the pad [ 22351] remove a split test's dependence on -Dx output (needed after change #22343) [ 22371] Fix a segfault during optree construction. (bug #27024) [ 22372] Enhance test cleanliness by a very small factor. [ 22373] [perl #26959] fix memory leak in @_ = ...; goto &sub [ 22375] Skip the Net/Ping/450_service failures on HP-UX for the time being p4raw-link: @22375 on //depot/perl: ff4091f15699664c73b1648f3e0ba5ff2c76be14 p4raw-link: @22373 on //depot/perl: 0a76ff6528f0ab52947d4f1b9664310ce137b9a0 p4raw-link: @22372 on //depot/perl: 1bca678fff053a0e59f0fc9898b8d61aeda6473e p4raw-link: @22371 on //depot/perl: e1548254d1365ef0342d5b64bb1fd1d996c1f70f p4raw-link: @22351 on //depot/perl: e550c049a174d317e4e17172c9276b8aca255fd8 p4raw-link: @22343 on //depot/perl: b6a15bc5202dd52395ce566b43e1490d38dc2141 p4raw-link: @22337 on //depot/perl: 8975a8c255049aa172fbac58615aa6b8f5076610 p4raw-id: //depot/maint-5.8/perl@22395 p4raw-edited: from //depot/perl@22394 'edit in' t/comp/parser.t (@22371..) p4raw-integrated: from //depot/perl@22394 'copy in' t/op/split.t (@19135..) lib/Net/Ping/t/450_service.t (@20021..) 'merge in' t/op/write.t (@22203..) pp_ctl.c (@22369..) p4raw-integrated: from //depot/perl@22371 'merge in' op.c (@22357..) p4raw-integrated: from //depot/perl@22343 'merge in' dump.c (@22315..) --- t/op/split.t | 12 ++++++------ t/op/write.t | 9 ++++++--- 2 files changed, 12 insertions(+), 9 deletions(-) (limited to 't/op') diff --git a/t/op/split.t b/t/op/split.t index 17ab1e6a37..957da24950 100755 --- a/t/op/split.t +++ b/t/op/split.t @@ -50,12 +50,12 @@ $_ = join(':', split(/:/,'1:2:3:4:5:6:::', 999)); is($_ , '1:2:3:4:5:6:::'); # Does assignment to a list imply split to one more field than that? -if ($^O eq 'MSWin32') { $foo = `.\\perl -D1024 -e "(\$a,\$b) = split;" 2>&1` } -elsif ($^O eq 'NetWare') { $foo = `perl -D1024 -e "(\$a,\$b) = split;" 2>&1` } -elsif ($^O eq 'VMS') { $foo = `./perl "-D1024" -e "(\$a,\$b) = split;" 2>&1` } -elsif ($^O eq 'MacOS'){ $foo = `$^X "-D1024" -e "(\$a,\$b) = split;"` } -else { $foo = `./perl -D1024 -e '(\$a,\$b) = split;' 2>&1` } -ok($foo =~ /DEBUGGING/ || $foo =~ /SV = (VOID|IV\(3\))/); +if ($^O eq 'MSWin32') { $foo = `.\\perl -Dt -e "(\$a,\$b) = split;" 2>&1` } +elsif ($^O eq 'NetWare') { $foo = `perl -Dt -e "(\$a,\$b) = split;" 2>&1` } +elsif ($^O eq 'VMS') { $foo = `./perl "-Dt" -e "(\$a,\$b) = split;" 2>&1` } +elsif ($^O eq 'MacOS'){ $foo = `$^X "-Dt" -e "(\$a,\$b) = split;"` } +else { $foo = `./perl -Dt -e '(\$a,\$b) = split;' 2>&1` } +ok($foo =~ /DEBUGGING/ || $foo =~ /\Qconst(IV(3))\E/); # Can we say how many fields to split to when assigning to a list? ($a,$b) = split(' ','1 2 3 4 5 6', 2); diff --git a/t/op/write.t b/t/op/write.t index ab721f7a37..7b88c40582 100755 --- a/t/op/write.t +++ b/t/op/write.t @@ -33,7 +33,7 @@ my @NumTests = ( 999.99499, '999.99', -100, '######' ], [ '@0#.##', 0, '000.00', 1, '001.00', 10, '010.00', - -0.0001, '-00.00' ], + -0.0001, qr/^[\-0]00\.00$/ ], ); @@ -486,8 +486,11 @@ for my $tref ( @NumTests ){ my $expected = shift @$tref; my $writeres = swrite( $writefmt, $val ); $nt++; - - print $expected eq $writeres + my $ok = ref($expected) + ? $writeres =~ $expected + : $writeres eq $expected; + + print $ok ? "ok $nt\n" : "not ok $nt\n# f=[$writefmt] exp=[$expected] got=[$writeres]\n"; } -- cgit v1.2.1