diff options
author | Niko Tyni <ntyni@debian.org> | 2010-11-13 00:02:07 +0200 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-11-14 16:52:23 -0800 |
commit | 125b9982af05cc67a7f8daefd5060a9eb9524824 (patch) | |
tree | df0d7e0e78095a25e83cae94af54a54302f342fc /t/op | |
parent | 99e6ea262e0d5e6a5eea5692f2b99d422027c0a4 (diff) | |
download | perl-125b9982af05cc67a7f8daefd5060a9eb9524824.tar.gz |
Implement $^A tainting
The format accumulator $^A now becomes tainted when formline() is
called with tainted data.
There is still one failing test from the TODO set; it seems
that the $^A get magic is handled too late for the taintedness
to show up.
Diffstat (limited to 't/op')
-rw-r--r-- | t/op/taint.t | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/t/op/taint.t b/t/op/taint.t index 76e312fdac..86372bd1f4 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 => 335; +plan tests => 336; $| = 1; @@ -1405,8 +1405,7 @@ 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"); @@ -1423,6 +1422,10 @@ TODO: { formline('@' .('<'*5) . ' | @*', 'hallo', 'welt'); ok(!tainted($^A), "accumulator still untainted"); formline('@' .('<'*(5+$TAINT0)) . ' | @*', 'hallo', 'welt'); + TODO: { + local $::TODO = "get magic handled too late?"; + ok(tainted($^A), "the accumulator should be tainted already"); + } ok(tainted($^A), "tainted formline picture makes a tainted accumulator"); } |