diff options
author | SADAHIRO Tomoyuki <BQW10602@nifty.com> | 2005-12-05 01:28:35 +0900 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-12-05 15:15:53 +0000 |
commit | 711a919c41ea4a93a45e4b6240ea6550abe85615 (patch) | |
tree | 5d03c5186caa4dcc34d4f9fe86280116b40235ec /t | |
parent | ec5fee461a5f1addabf15a3f9a2832a74bed5afe (diff) | |
download | perl-711a919c41ea4a93a45e4b6240ea6550abe85615.tar.gz |
Clarification and cleanup of the XS SWASHGET code
Subject: Re: XS-assisted SWASHGET (esp. for t/uni/class.t speedup)
Message-Id: <20051204162508.D726.BQW10602@nifty.com>
p4raw-id: //depot/perl@26255
Diffstat (limited to 't')
-rwxr-xr-x | t/op/pat.t | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/t/op/pat.t b/t/op/pat.t index 4ab37ade79..dff0b65bf1 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..1191\n"; +print "1..1195\n"; BEGIN { chdir 't' if -d 't'; @@ -2993,8 +2993,8 @@ sub IsSyriac1 { END } -print "\x{0712}" =~ /\p{IsSyriac1}/ ? "ok $test\n" : "not ok $test\n"; $test++; -print "\x{072F}" =~ /\P{IsSyriac1}/ ? "ok $test\n" : "not ok $test\n"; $test++; +ok("\x{0712}" =~ /\p{IsSyriac1}/, '\x{0712}, \p{IsSyriac1}'); +ok("\x{072F}" =~ /\P{IsSyriac1}/, '\x{072F}, \P{IsSyriac1}'); sub Syriac1 { return <<'END'; @@ -3003,8 +3003,8 @@ sub Syriac1 { END } -print "\x{0712}" =~ /\p{Syriac1}/ ? "ok $test\n" : "not ok $test\n"; $test++; -print "\x{072F}" =~ /\P{Syriac1}/ ? "ok $test\n" : "not ok $test\n"; $test++; +ok("\x{0712}" =~ /\p{Syriac1}/, '\x{0712}, \p{Syriac1}'); +ok("\x{072F}" =~ /\P{Syriac1}/, '\x{072F}, \p{Syriac1}'); print "# user-defined character properties may lack \\n at the end\n"; sub InGreekSmall { return "03B1\t03C9" } @@ -3015,6 +3015,18 @@ ok("\x{03C2}" =~ /\p{InGreekSmall}/, "Final sigma"); ok("\x{03A0}" =~ /\p{InGreekCapital}/, "Capital PI"); ok("\x{03A2}" =~ /\P{InGreekCapital}/, "Reserved"); +sub AsciiHexAndDash { + return <<'END'; ++utf8::ASCII_Hex_Digit ++utf8::Dash +END +} + +ok("-" =~ /\p{Dash}/, "'-' is Dash"); +ok("A" =~ /\p{ASCII_Hex_Digit}/, "'A' is ASCII_Hex_Digit"); +ok("-" =~ /\p{AsciiHexAndDash}/, "'-' is AsciiHexAndDash"); +ok("A" =~ /\p{AsciiHexAndDash}/, "'A' is AsciiHexAndDash"); + { print "# Change #18179\n"; # previously failed with "panic: end_shift @@ -3411,5 +3423,5 @@ ok(("foba ba$s" =~ qr/(foo|BaSS|bar)/i) "# TODO assigning to original string should not corrupt match vars"); } -# last test 1191 +# last test 1195 |