summaryrefslogtreecommitdiff
path: root/test/test_utf8.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-09-05 22:06:58 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-09-05 22:06:58 +0200
commitc9b3c26db59d89e320a6eb86d9558051ecba0900 (patch)
treef262530a11155451c4d60b04493ea580e7d3e054 /test/test_utf8.c
parent83ea1be016fd5fc27ee721cf62a18716675815dc (diff)
New upstream version 6.9.0upstream/6.9.0
Diffstat (limited to 'test/test_utf8.c')
-rw-r--r--test/test_utf8.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_utf8.c b/test/test_utf8.c
index bd3ed16..d5a966b 100644
--- a/test/test_utf8.c
+++ b/test/test_utf8.c
@@ -394,6 +394,10 @@ extern int main(int argc, char* argv[])
x2("a|(?i)c", "C", 0, 1);
x2("(?i)c|a", "C", 0, 1);
x2("(?i)c|a", "A", 0, 1);
+ x2("a(?i)b|c", "aB", 0, 2);
+ x2("a(?i)b|c", "aC", 0, 2);
+ n("a(?i)b|c", "AC");
+ n("a(?:(?i)b)|c", "aC");
x2("(?i:c)|a", "C", 0, 1);
n("(?i:c)|a", "A");
x2("[abc]?", "abc", 0, 1);
@@ -933,6 +937,10 @@ extern int main(int argc, char* argv[])
x2("\\p{Hiragana}", "ぴ", 0, 3);
n("\\P{Hiragana}", "ぴ");
+ x2("\\p{Emoji}", "\xE2\xAD\x90", 0, 3);
+ x2("\\p{^Emoji}", "\xEF\xBC\x93", 0, 3);
+ x2("\\p{Extended_Pictographic}", "\xE2\x9A\xA1", 0, 3);
+ n("\\p{Extended_Pictographic}", "\xE3\x81\x82");
x2("\\p{Word}", "こ", 0, 3);
n("\\p{^Word}", "こ");
@@ -1035,6 +1043,11 @@ extern int main(int argc, char* argv[])
x2(".\\Y.", "\xE0\xA4\xB7\xE0\xA4\xBF", 0, 6);
n(".\\y.", "\xE0\xA4\xB7\xE0\xA4\xBF");
+ // {Extended_Pictographic} Extend* ZWJ x {Extended_Pictographic}
+ x2("..\\Y.", "\xE3\x80\xB0\xE2\x80\x8D\xE2\xAD\x95", 0, 9);
+ x2("...\\Y.", "\xE3\x80\xB0\xCC\x82\xE2\x80\x8D\xE2\xAD\x95", 0, 11);
+ n("...\\Y.", "\xE3\x80\xB0\xCD\xB0\xE2\x80\x8D\xE2\xAD\x95");
+
// CR + LF
n("^\\X\\X$", "\x0d\x0a");
x2("^\\X$", "\x0d\x0a", 0, 2);