summaryrefslogtreecommitdiff
path: root/test/testu.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/testu.c
parenta89a4ac904bc93b1d93b410394fa05c23260351b (diff)
parentb7ad39361a923207113da1145f8655a1bc50c3aa (diff)
Merge branch 'release/6.6.1-1'6.6.1-1
Diffstat (limited to 'test/testu.c')
-rw-r--r--test/testu.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/testu.c b/test/testu.c
index 6ff3a10..d037194 100644
--- a/test/testu.c
+++ b/test/testu.c
@@ -915,6 +915,46 @@ extern int main(int argc, char* argv[])
x2("\000\\\000R\000\000", "\x20\x29\000\000", 0, 2);
n("\000\\\000R\000\000", "\x20\x2a\000\000");
+ x2("\000\\\000w\000\000", "\x01\x00\000\000", 0, 2);
+ n("\000\\\000W\000\000", "\x01\x00\000\000");
+ x2("\000\\\000d\000\000", "\x0b\x66\000\000", 0, 2);
+ n("\000\\\000D\000\000", "\x0b\x66\000\000");
+ x2("\000\\\000s\000\000", "\x20\x01\000\000", 0, 2);
+ n("\000\\\000S\000\000", "\x20\x01\000\000");
+ x2("\000\\\000b\000\000", "\x00\x20\x01\x00\000\000", 2, 2);
+ n("\000\\\000B\000\000", "\x01\x00\000\000");
+ x2("\000\\\000B\000\000", "\x00\x20\000\000", 0, 0);
+ x2("\000[\000[\000:\000g\000r\000a\000p\000h\000:\000]\000]\000\000",
+ "\x0d\x30\000\000", 0, 2);
+ n("\000[\000[\000:\000g\000r\000a\000p\000h\000:\000]\000]\000\000",
+ "\x0a\x00\000\000");
+
+ // extended grapheme cluster
+
+ // CR + LF
+ n("\000.\000\\\000y\000\\\000O\000\000", "\x00\x0d\x00\x0a\000\000");
+ x2("\000.\000\\\000Y\000\\\000O\000\000", "\x00\x0d\x00\x0a\000\000", 0, 4);
+
+ // LATIN SMALL LETTER G, COMBINING DIAERESIS
+ n("\000^\000.\000\\\000y\000.\000$\000\000", "\x00\x67\x03\x08\000\000");
+ x2("\000.\000\\\000Y\000.\000\000", "\x00\x67\x03\x08\000\000", 0, 4);
+ x2("\000\\\000y\000.\000\\\000Y\000.\000\\\000y\000\000",
+ "\x00\x67\x03\x08\000\000", 0, 4);
+ // TAMIL LETTER NA, TAMIL VOWEL SIGN I,
+ x2("\000.\000\\\000Y\000.\000\000", "\x0B\xA8\x0B\xBF\000\000", 0, 4);
+ n("\000.\000\\\000y\000.\000\000", "\x0B\xA8\x0B\xBF\000\000");
+
+ // CR + LF
+ n("\000\\\000X\000\\\000X\000\000", "\x00\x0d\x00\x0a\000\000");
+ x2("\000^\000\\\000X\000$\000\000", "\x00\x0d\x00\x0a\000\000", 0, 4);
+ // LATIN SMALL LETTER G, COMBINING DIAERESIS
+ n("\000\\\000X\000\\\000X\000\000", "\x00\x67\x03\x08\000\000");
+ x2("\000^\000\\\000X\000$\000\000", "\x00\x67\x03\x08\000\000", 0, 4);
+ // TAMIL LETTER NA, TAMIL VOWEL SIGN I,
+ x2("\000^\000\\\000X\000$\000\000", "\x0B\xA8\x0B\xBF\000\000", 0, 4);
+ n("\000\\\000X\000\\\000X\000\000", "\x0B\xA8\x0B\xBF\000\000");
+
+
fprintf(stdout,
"\nRESULT SUCC: %d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n",
nsucc, nfail, nerror, onig_version());