This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexp_unicode_prop.t: Add tests.
authorKarl Williamson <public@khwilliamson.com>
Sat, 22 Oct 2011 20:08:10 +0000 (14:08 -0600)
committerKarl Williamson <public@khwilliamson.com>
Sat, 22 Oct 2011 20:36:38 +0000 (14:36 -0600)
These tests make sure that a user-defined property may be included as
part of another user-defined property.

t/re/regexp_unicode_prop.t

index a36afdf..3e08afc 100644 (file)
@@ -91,6 +91,8 @@ my @USER_DEFINED_PROPERTIES = (
    InNotKana                 => ['\x{3040}', '!\x{3041}'],
    InConsonant               => ['d',        '!e'],
    IsSyriac1                 => ['\x{0712}', '!\x{072F}'],
+   IsSyriac1KanaMark         => ['\x{309A}', '!\x{3090}'],
+   IsSyriac1KanaMark         => ['\x{0730}', '!\x{0712}'],
    '# User-defined character properties may lack \n at the end',
    InGreekSmall              => ['\N{GREEK SMALL LETTER PI}',
                                  '\N{GREEK SMALL LETTER FINAL SIGMA}'],
@@ -344,6 +346,13 @@ sub IsMyUpper {
     }
 }
 
+# Verify that can use user-defined properties inside another one
+sub IsSyriac1KanaMark {<<'--'}
++main::IsSyriac1
++main::InKana3
+&utf8::IsMark
+--
+
 # fake user-defined properties; these subs shouldn't be called, because
 # their names don't start with In or Is