summaryrefslogtreecommitdiff
path: root/test/testc.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 14:22:27 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 14:22:27 +0100
commitfa131e9ad996d099bb48a3b1302e4a3b3c0f03bd (patch)
tree7b4963ddd27303d1a8e856acdd3a55ce9ed179f7 /test/testc.c
parenta89a4ac904bc93b1d93b410394fa05c23260351b (diff)
parentb7ad39361a923207113da1145f8655a1bc50c3aa (diff)
Merge branch 'release/6.6.1-1'6.6.1-1
Diffstat (limited to 'test/testc.c')
-rw-r--r--test/testc.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/test/testc.c b/test/testc.c
index 222c9cd..1a60c8a 100644
--- a/test/testc.c
+++ b/test/testc.c
@@ -639,6 +639,7 @@ extern int main(int argc, char* argv[])
x2("(?~ab)", "ccc\ndab", 0, 5);
x2("(?m:(?~ab))", "ccc\ndab", 0, 5);
x2("(?-m:(?~ab))", "ccc\ndab", 0, 5);
+ x2("(?~abc)xyz", "xyz012345678901234567890123456789abc", 0, 3);
// absent with expr
x2("(?~|78|\\d*)", "123456789", 0, 6);
@@ -661,8 +662,9 @@ extern int main(int argc, char* argv[])
x2("(?~|aaaaa|a*+)", "aaaaa", 0, 0);
x2("(?~|aaaaaa|a*+)b", "aaaaaab", 1, 7);
x2("(?~|abcd|(?>))", "zzzabcd", 0, 0);
+ x2("(?~|abc|a*?)", "aaaabc", 0, 0);
- // absent range cutter
+ // absent stopper
x2("(?~|abc)a*", "aaaaaabc", 0, 5);
x2("(?~|abc)a*z|aaaaaabc", "aaaaaabc", 0, 8);
x2("(?~|aaaaaa)a*", "aaaaaa", 0, 0);
@@ -672,6 +674,21 @@ extern int main(int argc, char* argv[])
n("(?~|a)a", "a");
x2("(?~|a)(?~|)a", "a", 0, 1);
x2("(?~|a).*(?~|)a", "bbbbbbbbbbbbbbbbbbbba", 0, 21);
+ x2("(?~|abc).*(xyz|pqr)(?~|)abc", "aaaaxyzaaapqrabc", 0, 16);
+ x2("(?~|abc).*(xyz|pqr)(?~|)abc", "aaaaxyzaaaabcpqrabc", 11, 19);
+ n("\\A(?~|abc).*(xyz|pqrabc)(?~|)abc", "aaaaxyzaaaabcpqrabcabc");
+ x2("(?~|a)(?~|)c|ab|a|", "ab", 0, 2);
+ x2("(?~|a)((?~|)c|ab|a|)", "ab", 0, 0);
+ x2("(?~|a)((?>(?~|))c|ab|a|)", "ab", 0, 0);
+
+ // extended grapheme cluster
+
+ // CR + LF
+ n(".\\y\\O", "\x0d\x0a");
+ x2(".\\Y\\O", "\x0d\x0a", 0, 2);
+ n("\\X\\X", "\x0d\x0a");
+ x2("^\\X$", "\x0d\x0a", 0, 2);
+ x2("^\\X\\X\\X$", "ab\x0d\x0a", 0, 4);
/*
< ifndef IGNORE_EUC_JP >