21 sub A::B::Intersection {
28 sub test_regexp ($$) {
29 # test that given string consists of N-1 chars matching $qr1, and 1
33 # constructing these objects here makes the last test loop go much faster
34 my $qr1 = qr/(\p{$blk}+)/;
36 is($1, substr($str, 0, -1)); # all except last char
39 fail('first N-1 chars did not match');
42 my $qr2 = qr/(\P{$blk}+)/;
44 is($1, substr($str, -1)); # only last char
47 fail('last char did not match');
53 my $str = join "", map latin1_to_native(chr($_)), 0x20 .. 0x6F;
55 # make sure it finds built-in class
56 is(($str =~ /(\p{Letter}+)/)[0], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
57 is(($str =~ /(\p{l}+)/)[0], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
59 # make sure it finds user-defined class
60 is(($str =~ /(\p{MyUniClass}+)/)[0], '0123456789:;<=>?@ABCDEFGHIJKLMNO');
62 # make sure it finds class in other package
63 is(($str =~ /(\p{Other::Class}+)/)[0], '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_');
65 # make sure it finds class in other OTHER package
66 is(($str =~ /(\p{A::B::Intersection}+)/)[0], '@ABCDEFGHIJKLMNO');
68 # lib/unicore/Bc/AL.pl
69 $str = "\x{070D}\x{070E}\x{070F}\x{0710}\x{0711}";
70 is(($str =~ /(\P{BidiClass: ArabicLetter}+)/)[0], "\x{070F}");
71 is(($str =~ /(\P{BidiClass: AL}+)/)[0], "\x{070F}");
72 is(($str =~ /(\P{BC :ArabicLetter}+)/)[0], "\x{070F}");
73 is(($str =~ /(\P{bc=AL}+)/)[0], "\x{070F}");
75 # make sure InGreek works
76 $str = "[\x{038B}\x{038C}\x{038D}]";
78 is(($str =~ /(\p{InGreek}+)/)[0], "\x{038B}\x{038C}\x{038D}");
80 # The other tests that are based on looking at the generated files are now