From: Rafael Garcia-Suarez Date: Sat, 23 Dec 2006 15:52:27 +0000 (+0000) Subject: Remove -T from op/subst.t, and add a new test file, substT.t, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=25aae3a72e52ac6a70711f3dce68629d59f1cf87;p=p5sagit%2Fp5-mst-13.2.git Remove -T from op/subst.t, and add a new test file, substT.t, to run the s/// tests under taint mode; mark the test for RT #6006 as TODO, but only with -T. p4raw-id: //depot/perl@29618 --- diff --git a/MANIFEST b/MANIFEST index 67bcaae..a35efa7 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3589,6 +3589,7 @@ t/op/sub_lval.t See if lvalue subroutines work t/op/subst_amp.t See if $&-related substitution works t/op/substr.t See if substr works t/op/subst.t See if substitution works +t/op/substT.t See if substitution works with -T t/op/subst_wamp.t See if substitution works with $& present t/op/sub.t See if subroutines work t/op/switch.t See if switches (given/when) work diff --git a/t/op/subst.t b/t/op/subst.t index b4a824e..39f160d 100755 --- a/t/op/subst.t +++ b/t/op/subst.t @@ -1,4 +1,4 @@ -#!./perl -wT +#!./perl -w BEGIN { chdir 't' if -d 't'; @@ -563,11 +563,14 @@ is($name, "cis", q[#22351 bug with 'e' substitution modifier]); is($c, "\x20\x30\x40\x50\x60", "s/[\\x00-\\x1f]//g"); } { + { + local our $TODO = ${^TAINT} ? "doesn't work with taint mode" : 0; $_ = "xy"; no warnings 'uninitialized'; /(((((((((x)))))))))(z)/; # clear $10 s/(((((((((x)))))))))(y)/${10}/; is($_,"y","RT#6006: \$_ eq '$_'"); + } $_ = "xr"; s/(((((((((x)))))))))(r)/fooba${10}/; is($_,"foobar","RT#6006: \$_ eq '$_'"); diff --git a/t/op/substT.t b/t/op/substT.t new file mode 100644 index 0000000..82e0354 --- /dev/null +++ b/t/op/substT.t @@ -0,0 +1,9 @@ +#!perl -wT + +for $file ('op/subst.t', 't/op/subst.t', ':op:subst.t') { + if (-r $file) { + do ($^O eq 'MacOS' ? $file : "./$file"); + exit; + } +} +die "Cannot find op/subst.t or t/op/subst.t\n";