summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-02-28 13:22:34 +0000
committerNicholas Clark <nick@ccl4.org>2011-03-02 09:13:23 +0000
commit433f4d03929b449be3c7b24c481bcdb4b19b897c (patch)
tree03cae97eccf05734739787abb73af1d4292b19de /t
parent81cba34dfec599a5c705d6fae7bffa4076614bba (diff)
downloadperl-433f4d03929b449be3c7b24c481bcdb4b19b897c.tar.gz
In taint.t, avoid using ok() where better test functions are more suitable.
Diffstat (limited to 't')
-rw-r--r--t/op/taint.t12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/op/taint.t b/t/op/taint.t
index 13cbacaadc..fc5b60de8f 100644
--- a/t/op/taint.t
+++ b/t/op/taint.t
@@ -1582,12 +1582,12 @@ SKIP: {
}
-ok( ${^TAINT} == 1, '$^TAINT is on' );
+is(${^TAINT}, 1, '$^TAINT is on');
eval { ${^TAINT} = 0 };
-ok( ${^TAINT}, '$^TAINT is not assignable' );
-ok( $@ =~ /^Modification of a read-only value attempted/,
- 'Assigning to ${^TAINT} fails' );
+is(${^TAINT}, 1, '$^TAINT is not assignable');
+like($@, qr/^Modification of a read-only value attempted/,
+ 'Assigning to ${^TAINT} fails');
{
# bug 20011111.105
@@ -1890,11 +1890,11 @@ SKIP:
eval { printf($TAINT . "# %s\n", "foo") };
like($@, qr/^Insecure dependency in printf/, q/printf doesn't like tainted formats/);
eval { printf("# %s\n", $TAINT . "foo") };
- ok(!$@, q/printf accepts other tainted args/);
+ is($@, '', q/printf accepts other tainted args/);
eval { sprintf($TAINT . "# %s\n", "foo") };
like($@, qr/^Insecure dependency in sprintf/, q/sprintf doesn't like tainted formats/);
eval { sprintf("# %s\n", $TAINT . "foo") };
- ok(!$@, q/sprintf accepts other tainted args/);
+ is($@, '', q/sprintf accepts other tainted args/);
}
{