summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-06-04 17:06:18 -0600
committerKarl Williamson <public@khwilliamson.com>2011-07-03 14:05:47 -0600
commit707250fe6ada45a804765cf7a987b5c69b0fe045 (patch)
tree1da0796f6d2c17297cefa2978e6bc71f53a7a246
parent641b49c8f500a0dbe975c056cea24c28e04be400 (diff)
downloadperl-707250fe6ada45a804765cf7a987b5c69b0fe045.tar.gz
regexp_unicode_prop.t: Improve output
The ok statements were not giving the correct pattern; the not ok statements were not giving the failure reason.
-rw-r--r--t/re/regexp_unicode_prop.t10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/re/regexp_unicode_prop.t b/t/re/regexp_unicode_prop.t
index 54a2e7e94a..a36afdfc50 100644
--- a/t/re/regexp_unicode_prop.t
+++ b/t/re/regexp_unicode_prop.t
@@ -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");
}