summaryrefslogtreecommitdiff
path: root/t/op/split.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/split.t')
-rwxr-xr-xt/op/split.t8
1 files changed, 2 insertions, 6 deletions
diff --git a/t/op/split.t b/t/op/split.t
index 31a2f51bf9..d2deff38d3 100755
--- a/t/op/split.t
+++ b/t/op/split.t
@@ -50,12 +50,8 @@ $_ = 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 -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);