This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
4f890a3067e1198f missed qr// from t/re/pat.t in its refactoring in two places.
authorNicholas Clark <nick@ccl4.org>
Tue, 8 Mar 2011 09:56:48 +0000 (09:56 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 8 Mar 2011 10:17:22 +0000 (10:17 +0000)
like($@, /A pattern/, "Description") is going to compare $@ with the
*result* of matching $_ against that pattern, not that pattern.

t/re/pat.t

index 3b170c8..a14cb4f 100644 (file)
@@ -317,7 +317,7 @@ sub run_tests {
         is($@, '', $message);
 
         eval "'aaa' =~ /a{1,$::reg_infty}/";
-        like($@, /^\QQuantifier in {,} bigger than/, $message);
+        like($@, qr/^\QQuantifier in {,} bigger than/, $message);
         eval "'aaa' =~ /a{1,$::reg_infty_p}/";
         like($@, qr/^\QQuantifier in {,} bigger than/, $message);
     }
@@ -338,7 +338,7 @@ sub run_tests {
             unlike("b$a=", qr/a$a=/, $message);
             like("b$a=", qr/ba+=/, $message);
 
-           like("ba$a=", /b(?:a|b)+=/, $message);
+           like("ba$a=", qr/b(?:a|b)+=/, $message);
         }
     }