From: hv@crypt.org Date: Sat, 5 Dec 2009 00:50:02 +0000 (-0600) Subject: t/test.pl fresh_perl_like() bug X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=077f834239e40e0523e428946baaf95eaec43724;p=p5sagit%2Fp5-mst-13.2.git 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> --- diff --git a/t/test.pl b/t/test.pl index bb27794..c0406b0 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); }