summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-04-20 01:46:03 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-20 01:46:03 +0000
commit491fd90a109f6263a896300e5709e6fd255f075f (patch)
tree596ceeddf227da61927d12e4c2ce4c324fc43bbd /t/op
parentee081dd1f02934d943364e5d6bd4130bf9c3e0ad (diff)
downloadperl-491fd90a109f6263a896300e5709e6fd255f075f.tar.gz
User-defined character properties were unintentionally
removed, noticed by Dan Kogai. p4raw-id: //depot/perl@16012
Diffstat (limited to 't/op')
-rwxr-xr-xt/op/pat.t51
1 files changed, 49 insertions, 2 deletions
diff --git a/t/op/pat.t b/t/op/pat.t
index 853c59ccd2..905204bed1 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -6,7 +6,7 @@
$| = 1;
-print "1..900\n";
+print "1..908\n";
BEGIN {
chdir 't' if -d 't';
@@ -2800,7 +2800,7 @@ print "# some Unicode properties\n";
}
{
- # [ID 20020412.005] wrong pmop flags checked when empty pattern
+ print "# [ID 20020412.005] wrong pmop flags checked when empty pattern\n";
# requires reuse of last successful pattern
my $test = 898;
$test =~ /\d/;
@@ -2823,3 +2823,50 @@ print "# some Unicode properties\n";
}
++$test;
}
+
+print "# user-defined character properties\n";
+
+sub InKana1 {
+ return <<'END';
+3040 309F
+30A0 30FF
+END
+}
+
+sub InKana2 {
+ return <<'END';
++utf8::InHiragana
++utf8::InKatakana
+END
+}
+
+sub InKana3 {
+ return <<'END';
++utf8::InHiragana
++utf8::InKatakana
+-utf8::IsCn
+END
+}
+
+sub InNotKana {
+ return <<'END';
+!utf8::InHiragana
+-utf8::InKatakana
++utf8::IsCn
+END
+}
+
+$test = 901;
+
+print "\x{3040}" =~ /\p{InKana1}/ ? "ok $test\n" : "not ok $test\n"; $test++;
+print "\x{303F}" =~ /\P{InKana1}/ ? "ok $test\n" : "not ok $test\n"; $test++;
+
+print "\x{3040}" =~ /\p{InKana2}/ ? "ok $test\n" : "not ok $test\n"; $test++;
+print "\x{303F}" =~ /\P{InKana2}/ ? "ok $test\n" : "not ok $test\n"; $test++;
+
+print "\x{3041}" =~ /\p{InKana3}/ ? "ok $test\n" : "not ok $test\n"; $test++;
+print "\x{3040}" =~ /\P{InKana3}/ ? "ok $test\n" : "not ok $test\n"; $test++;
+
+print "\x{3040}" =~ /\p{InNotKana}/ ? "ok $test\n" : "not ok $test\n"; $test++;
+print "\x{3041}" =~ /\P{InNotKana}/ ? "ok $test\n" : "not ok $test\n"; $test++;
+