summaryrefslogtreecommitdiff
path: root/dist/IO
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avar@cpan.org>2014-06-21 17:44:20 +0000
committerÆvar Arnfjörð Bjarmason <avar@cpan.org>2014-06-21 17:58:43 +0000
commitaaa63daea7f8ece57d84d8329754f95ea107301e (patch)
tree2723b291b86bd26f2190f99be6858157f2e08af1 /dist/IO
parent43d7f0da895d00d0f557ad72549ddb3194763b55 (diff)
downloadperl-aaa63daea7f8ece57d84d8329754f95ea107301e.tar.gz
Make like() and unlike() in t/test.pl refuse non-qr// arguments
As I noted in v5.21.1-12-g826af13 we have subtle bugs in the test suite because you can do e.g. like($@, '') now which'll be a passing test even when we have an error, because $@ =~ // will be true. I'm just changing t/test.pl to not accept non-Regexp arguments, and fixing up a bunch of test failures that resulted from that. There might still be more of these in tests that I'm just not running, I've also changed some of these from $str =~ /foo/ to $str eq 'foo' (i.e. s/like/is/) in cases where that appeared to work, but it might break some systems. Let's just find that out via the smokers.
Diffstat (limited to 'dist/IO')
-rw-r--r--dist/IO/t/io_taint.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/IO/t/io_taint.t b/dist/IO/t/io_taint.t
index 5740353e77..7c3ffe6881 100644
--- a/dist/IO/t/io_taint.t
+++ b/dist/IO/t/io_taint.t
@@ -33,7 +33,7 @@ chop(my $unsafe = <$x>);
eval { kill 0 * $unsafe };
SKIP: {
skip($^O) if $^O eq 'MSWin32' or $^O eq 'NetWare';
- like($@, '^Insecure');
+ like($@, qr/^Insecure/);
}
$x->close;
@@ -44,7 +44,7 @@ $x->untaint;
ok(!$?); # Calling the method worked
chop($unsafe = <$x>);
eval { kill 0 * $unsafe };
-unlike($@,'^Insecure');
+unlike($@,qr/^Insecure/);
$x->close;
TODO: {