diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-09-01 19:54:36 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-09-01 19:54:36 +0200 |
commit | a3ec3a8d99a951fc599818b1ea9a2aa218b10fa5 (patch) | |
tree | 3ee714ca52a54635d91c7e3c10b968e0048022be /test/testc.c | |
parent | 6b31069db6198cd50cc17f2c63917dd2df5775fb (diff) | |
parent | de5adb21f7224352652be174c66fb88e596bb49c (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'test/testc.c')
-rw-r--r-- | test/testc.c | 19 |
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 > |