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
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
-#!./perl -wT
+#!./perl -w
BEGIN {
chdir 't' if -d 't';
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 '$_'");
--- /dev/null
+#!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";