From 433f4d03929b449be3c7b24c481bcdb4b19b897c Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 28 Feb 2011 13:22:34 +0000 Subject: [PATCH] In taint.t, avoid using ok() where better test functions are more suitable. --- t/op/taint.t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/op/taint.t b/t/op/taint.t index 13cbaca..fc5b60d 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/); } { -- 2.7.4