Lots of consting
[p5sagit/p5-mst-13.2.git] / t / op / split.t
index 31a2f51..d2deff3 100755 (executable)
@@ -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);