summaryrefslogtreecommitdiff
path: root/t/test.pl
diff options
context:
space:
mode:
authorhv@crypt.org <hv@crypt.org>2009-12-04 18:50:02 -0600
committerCraig A. Berry <craigberry@mac.com>2009-12-04 18:51:40 -0600
commit077f834239e40e0523e428946baaf95eaec43724 (patch)
tree0676ab4696e622cdcc9d7efa08e8c881daf2539a /t/test.pl
parent517956bf3975a79f7429698dce4510d4616b19a3 (diff)
downloadperl-077f834239e40e0523e428946baaf95eaec43724.tar.gz
t/test.pl fresh_perl_like() bug
The existing code does the wrong thing if a string (rather than a compiled regexp) is supplied for $expected. Happily perl will do the right thing if you let it. Hugo Message-Id: <200912041444.nB4EiqBj004436@zen.crypt.org>
Diffstat (limited to 't/test.pl')
-rw-r--r--t/test.pl4
1 files changed, 1 insertions, 3 deletions
diff --git a/t/test.pl b/t/test.pl
index bb27794334..c0406b0095 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -738,9 +738,7 @@ sub fresh_perl_like {
my($prog, $expected, $runperl_args, $name) = @_;
local $Level = 2;
_fresh_perl($prog,
- sub { @_ ?
- $_[0] =~ (ref $expected ? $expected : /$expected/) :
- $expected },
+ sub { @_ ? $_[0] =~ $expected : $expected },
$runperl_args, $name);
}