summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pod/perlunicode.pod13
-rwxr-xr-xt/op/pat.t45
2 files changed, 42 insertions, 16 deletions
diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod
index 4d6be20ffa..43ab5cb9be 100644
--- a/pod/perlunicode.pod
+++ b/pod/perlunicode.pod
@@ -187,11 +187,12 @@ You can also negate both C<\p{}> and C<\P{}> by introducing a caret
(^) between the first curly and the property name: C<\p{^InTamil}> is
equal to C<\P{InTamil}>.
-The C<In> can be left out: C<\p{Greek}> is equal to C<\p{InGreek}>.
+The C<In> and C<Is> can be left out: C<\p{Greek}> is equal to
+C<\p{InGreek}>, C<\P{Pd}> is equal to C<\P{Pd}>.
-Here is the list as of Unicode 3.1.1 (the two-letter classes) and
-as defined by Perl (the one-letter classes) (in Unicode materials
-what Perl calls C<L> is often called C<L&>):
+Here is the list as of Unicode 3.1.1 (the two-letter classes) and as
+defined by Perl (the one-letter classes) (what Perl calls C<L> is
+often in Unicode materials called C<L&>):
L Letter
Lu Letter, Uppercase
@@ -324,8 +325,8 @@ version has C<Block> appended to its name, C<\p{InKatakanaBlock}>.
Notice that this definition was introduced in Perl 5.8.0: in Perl
5.6.0 only the blocks were used; in Perl 5.8.0 scripts became the
-preferential character class definition; this meant that the
-definitions of some character classes changed (the ones in the
+preferential Unicode character class definition; this meant that
+the definitions of some character classes changed (the ones in the
below list that have the C<Block> appended).
BasicLatin
diff --git a/t/op/pat.t b/t/op/pat.t
index 50258b90c5..e65db55371 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -6,7 +6,7 @@
$| = 1;
-print "1..730\n";
+print "1..738\n";
BEGIN {
chdir 't' if -d 't';
@@ -2153,30 +2153,55 @@ print "# some Unicode properties\n";
print "not " if "a" =~ /\p{IsLu}/;
print "ok 721\n";
- print "not " unless "A" =~ /\pL/;
+ print "not " unless "a" =~ /\p{Ll}/;
print "ok 722\n";
- print "not " unless "A" =~ /\p{IsLu}/;
+ print "not " if "a" =~ /\p{Lu}/;
print "ok 723\n";
- print "not " if "A" =~ /\p{IsLl}/;
+ print "not " unless "A" =~ /\pL/;
print "ok 724\n";
- print "not " if "a" =~ /\PL/;
+ print "not " unless "A" =~ /\p{IsLu}/;
print "ok 725\n";
- print "not " if "a" =~ /\P{IsLl}/;
+ print "not " if "A" =~ /\p{IsLl}/;
print "ok 726\n";
- print "not " unless "a" =~ /\P{IsLu}/;
+ print "not " unless "A" =~ /\p{Lu}/;
print "ok 727\n";
- print "not " if "A" =~ /\PL/;
+ print "not " if "A" =~ /\p{Ll}/;
print "ok 728\n";
- print "not " if "A" =~ /\P{IsLu}/;
+ print "not " if "a" =~ /\PL/;
print "ok 729\n";
- print "not " unless "A" =~ /\P{IsLl}/;
+ print "not " if "a" =~ /\P{IsLl}/;
print "ok 730\n";
+
+ print "not " unless "a" =~ /\P{IsLu}/;
+ print "ok 731\n";
+
+ print "not " if "a" =~ /\P{Ll}/;
+ print "ok 732\n";
+
+ print "not " unless "a" =~ /\P{Lu}/;
+ print "ok 733\n";
+
+ print "not " if "A" =~ /\PL/;
+ print "ok 734\n";
+
+ print "not " if "A" =~ /\P{IsLu}/;
+ print "ok 735\n";
+
+ print "not " unless "A" =~ /\P{IsLl}/;
+ print "ok 736\n";
+
+ print "not " if "A" =~ /\P{Lu}/;
+ print "ok 737\n";
+
+ print "not " unless "A" =~ /\P{Ll}/;
+ print "ok 738\n";
+
}