Because of a longstanding pipe bug, the debugging output "const(IV(3))" might have a newline in the middle of it when read through a pipe (as of course it does in the test suite), so this patch modifies the pattern to match the newline when present. While I was there, I thought we should let runperl worry about how to run perl.
--- t/op/split.t;-0 Mon May 3 13:07:10 2004 +++ t/op/split.t Fri Jan 7 12:29:04 2005 @@ -50,12 +50,8 @@ 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 -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/); +$foo = runperl( switches => ['-Dt'], stderr => 1, prog => '($a,$b)=split;' ); +ok($foo =~ /DEBUGGING/ || $foo =~ /const\n?\Q(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);