BEGIN { chdir 't' if -d 't'; @INC = qw(../lib .); require "test.pl"; } plan tests => 11; my $str = join "", map latin1_to_native(chr($_)), 0x20 .. 0x6F; is(($str =~ /(\p{IsMyUniClass}+)/)[0], '0123456789:;<=>?@ABCDEFGHIJKLMNO', 'user-defined class compiled before defined'); sub IsMyUniClass { <?@ABCDEFGHIJKLMNO'); # make sure it finds class in other package is(($str =~ /(\p{Other::IsClass}+)/)[0], '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'); # make sure it finds class in other OTHER package is(($str =~ /(\p{A::B::Intersection}+)/)[0], '@ABCDEFGHIJKLMNO'); # lib/unicore/lib/Bc/AL.pl. U+070E is unassigned, currently, but still has # bidi class AL. The first one in the sequence that doesn't is 0711, which is # BC=NSM. $str = "\x{070D}\x{070E}\x{070F}\x{0710}\x{0711}\x{0712}"; is(($str =~ /(\P{BidiClass: ArabicLetter}+)/)[0], "\x{0711}"); is(($str =~ /(\P{BidiClass: AL}+)/)[0], "\x{0711}"); is(($str =~ /(\P{BC :ArabicLetter}+)/)[0], "\x{0711}"); is(($str =~ /(\P{bc=AL}+)/)[0], "\x{0711}"); # make sure InGreek works $str = "[\x{038B}\x{038C}\x{038D}]"; is(($str =~ /(\p{InGreek}+)/)[0], "\x{038B}\x{038C}\x{038D}"); # The other tests that are based on looking at the generated files are now # in t/re/uniprops.t