summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/op/taint.t23
1 files changed, 22 insertions, 1 deletions
diff --git a/t/op/taint.t b/t/op/taint.t
index 158824eb53..76e312fdac 100644
--- a/t/op/taint.t
+++ b/t/op/taint.t
@@ -17,7 +17,7 @@ use Config;
use File::Spec::Functions;
BEGIN { require './test.pl'; }
-plan tests => 326;
+plan tests => 335;
$| = 1;
@@ -1405,6 +1405,27 @@ end
"formline survives a tainted dynamic picture");
}
+TODO: {
+ local $::TODO = '$^A tainting unimplemented';
+ ok(!tainted($^A), "format accumulator not tainted yet");
+ formline('@ | @*', 'hallo' . $TAINT, 'welt');
+ ok(tainted($^A), "tainted formline argument makes a tainted accumulator");
+ $^A = "";
+ ok(!tainted($^A), "accumulator can be explicitly untainted");
+ formline('@' .('<'*5) . ' | @*', 'hallo', 'welt');
+ ok(!tainted($^A), "accumulator still untainted");
+ $^A = "" . $TAINT;
+ ok(tainted($^A), "accumulator can be explicitly tainted");
+ formline('@' .('<'*5) . ' | @*', 'hallo', 'welt');
+ ok(tainted($^A), "accumulator still tainted");
+ $^A = "";
+ ok(!tainted($^A), "accumulator untainted again");
+ formline('@' .('<'*5) . ' | @*', 'hallo', 'welt');
+ ok(!tainted($^A), "accumulator still untainted");
+ formline('@' .('<'*(5+$TAINT0)) . ' | @*', 'hallo', 'welt');
+ ok(tainted($^A), "tainted formline picture makes a tainted accumulator");
+}
+
# This may bomb out with the alarm signal so keep it last
SKIP: {
skip "No alarm()" unless $Config{d_alarm};