diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-04-19 08:57:17 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-04-19 08:57:17 +0000 |
commit | 0f1b7392b6ef0fdb863906170718343a907e3a42 (patch) | |
tree | 08724d8fa555b6148844f6639a8b11cae06a663b /t/uni | |
parent | bac0b42524fd3607268d7139a21b07697a1c978b (diff) | |
download | perl-0f1b7392b6ef0fdb863906170718343a907e3a42.tar.gz |
New file left out of the last commit.
p4raw-id: //depot/perl@22714
Diffstat (limited to 't/uni')
-rw-r--r-- | t/uni/class.t | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/t/uni/class.t b/t/uni/class.t new file mode 100644 index 0000000000..24f65fa2aa --- /dev/null +++ b/t/uni/class.t @@ -0,0 +1,41 @@ +BEGIN { + chdir 't' if -d 't'; + @INC = qw(../lib .); + require "test.pl"; +} + +plan tests => 4; + +sub MyUniClass { + <<END; +0030 004F +END +} + +sub Other::Class { + <<END; +0040 005F +END +} + +sub A::B::Intersection { + <<END; ++main::MyUniClass +&Other::Class +END +} + + +my $str = join "", map chr($_), 0x20 .. 0x6F; + +# make sure it finds built-in class +is(($str =~ /(\p{Letter}+)/)[0], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'); + +# make sure it finds user-defined class +is(($str =~ /(\p{MyUniClass}+)/)[0], '0123456789:;<=>?@ABCDEFGHIJKLMNO'); + +# make sure it finds class in other package +is(($str =~ /(\p{Other::Class}+)/)[0], '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'); + +# make sure it finds class in other OTHER package +is(($str =~ /(\p{A::B::Intersection}+)/)[0], '@ABCDEFGHIJKLMNO'); |