From: Karl Williamson Date: Sat, 4 Jun 2011 23:06:18 +0000 (-0600) Subject: regexp_unicode_prop.t: Improve output X-Git-Tag: accepted/trunk/20130322.191538~3467^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=707250fe6ada45a804765cf7a987b5c69b0fe045;p=platform%2Fupstream%2Fperl.git 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. --- diff --git a/t/re/regexp_unicode_prop.t b/t/re/regexp_unicode_prop.t index 54a2e7e..a36afdf 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"); }