regexp_unicode_prop.t: Improve output
authorKarl Williamson <public@khwilliamson.com>
Sat, 4 Jun 2011 23:06:18 +0000 (17:06 -0600)
committerKarl Williamson <public@khwilliamson.com>
Sun, 3 Jul 2011 20:05:47 +0000 (14:05 -0600)
The ok statements were not giving the correct pattern; the not ok
statements were not giving the failure reason.

t/re/regexp_unicode_prop.t

index 54a2e7e..a36afdf 100644 (file)
@@ -202,13 +202,15 @@ sub match {
     }
 
     undef $@;
-    my $match_pat = eval "qr/$match/$caseless";
-    is($@, '', "$name compiled correctly to a regexp");
+    my $pat = "qr/$match/$caseless";
+    my $match_pat = eval $pat;
+    is($@, '', "$pat compiled correctly to a regexp: $@");
     like($str, $match_pat, "$name correctly matched");
 
     undef $@;
-    my $nomatch_pat = eval "qr/$nomatch/$caseless";
-    is($@, '', "$name compiled correctly to a regexp");
+    $pat = "qr/$nomatch/$caseless";
+    my $nomatch_pat = eval $pat;
+    is($@, '', "$pat compiled correctly to a regexp: $@");
     unlike($str, $nomatch_pat, "$name correctly did not match");
 }