This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make like() and unlike() in t/test.pl refuse non-qr// arguments
authorÆvar Arnfjörð Bjarmason <avar@cpan.org>
Sat, 21 Jun 2014 17:44:20 +0000 (17:44 +0000)
committerÆvar Arnfjörð Bjarmason <avar@cpan.org>
Sat, 21 Jun 2014 17:58:43 +0000 (17:58 +0000)
commitaaa63daea7f8ece57d84d8329754f95ea107301e
tree2723b291b86bd26f2190f99be6858157f2e08af1
parent43d7f0da895d00d0f557ad72549ddb3194763b55
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.
28 files changed:
dist/IO/t/io_taint.t
dist/threads/t/err.t
dist/threads/t/exit.t
ext/B/t/concise.t
ext/XS-APItest/t/call.t
lib/charnames.t
lib/overload.t
lib/perl5db.t
t/io/utf8.t
t/op/attrproto.t
t/op/attrs.t
t/op/bop.t
t/op/coreamp.t
t/op/die.t
t/op/each.t
t/op/local.t
t/op/magic.t
t/op/method.t
t/op/pack.t
t/op/qr.t
t/op/readline.t
t/op/ref.t
t/op/sprintf2.t
t/re/pat_advanced.t
t/re/reg_fold.t
t/test.pl
t/uni/attrs.t
t/uni/readline.t