summaryrefslogtreecommitdiff
path: root/test/testc.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-09-01 18:53:23 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-09-01 18:53:23 +0200
commitb62fc1758f4ae8459e6d7e8386ca547274b4daa2 (patch)
tree7665bd379e46db015577fe6851b07b4fe2b6a1c9 /test/testc.c
parentac077032be00edc79afc21983f50bc1cdf9af907 (diff)
New upstream version 6.6.1upstream/6.6.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 >