diff options
Diffstat (limited to 't/op/taint.t')
-rwxr-xr-x | t/op/taint.t | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/t/op/taint.t b/t/op/taint.t index 66e26d82c9..d0ba887948 100755 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -79,7 +79,7 @@ print PROG 'print "@ARGV\n"', "\n"; close PROG; my $echo = "$Invoke_Perl $ECHO"; -print "1..98\n"; +print "1..112\n"; # First, let's make sure that Perl is checking the dangerous # environment variables. Maybe they aren't set yet, so we'll @@ -444,3 +444,23 @@ print "1..98\n"; test 97, tainted $$fooref; test 98, tainted $foo; } + +# Some tests involving assignment +{ + my $foo = $TAINT0; + my $bar = $foo; + test 99, all_tainted $foo, $bar; + test 100, tainted($foo = $bar); + test 101, tainted($bar = $bar); + test 102, tainted($bar += $bar); + test 103, tainted($bar -= $bar); + test 104, tainted($bar *= $bar); + test 105, tainted($bar++); + test 106, tainted($bar /= $bar); + test 107, tainted($bar += 0); + test 108, tainted($bar -= 2); + test 109, tainted($bar *= -1); + test 110, tainted($bar /= 1); + test 111, tainted($bar--); + test 112, $bar == 0; +} |