diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2018-12-21 13:52:15 +0100 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2018-12-21 13:52:15 +0100 | 
| commit | b746c25a6800aabc468eee653d8bca8e7810f633 (patch) | |
| tree | ae87806ec6d6b65e9d3ae1729ccf253e12324e96 /test/test_utf8.c | |
| parent | eb5b295d37e9150e169cc95cbbc39f6ab7b88b2f (diff) | |
| parent | 8d7d4edacab0298f96a3826819c01b4e8f6cbcfb (diff) | |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'test/test_utf8.c')
| -rw-r--r-- | test/test_utf8.c | 33 | 
1 files changed, 28 insertions, 5 deletions
| diff --git a/test/test_utf8.c b/test/test_utf8.c index d5a966b..02aa06b 100644 --- a/test/test_utf8.c +++ b/test/test_utf8.c @@ -9,11 +9,7 @@  #include "oniguruma.h" -#ifdef HAVE_STRING_H -# include <string.h> -#else -# include <strings.h> -#endif +#include <string.h>  #define SLEN(s)  strlen(s) @@ -276,7 +272,33 @@ extern int main(int argc, char* argv[])    x2("(?i:a)", "a", 0, 1);    x2("(?i:a)", "A", 0, 1);    x2("(?i:A)", "a", 0, 1); +  x2("(?i:i)", "I", 0, 1); +  x2("(?i:I)", "i", 0, 1); +  x2("(?i:[A-Z])", "i", 0, 1); +  x2("(?i:[a-z])", "I", 0, 1);    n("(?i:A)", "b"); +  x2("(?i:ss)", "ss", 0, 2); +  x2("(?i:ss)", "Ss", 0, 2); +  x2("(?i:ss)", "SS", 0, 2); +  /* 0xc5,0xbf == 017F: # LATIN SMALL LETTER LONG S */ +  x2("(?i:ss)", "\xc5\xbfS", 0, 3); +  x2("(?i:ss)", "s\xc5\xbf", 0, 3); +  /* 0xc3,0x9f == 00DF: # LATIN SMALL LETTER SHARP S */ +  x2("(?i:ss)", "\xc3\x9f", 0, 2); +  /* 0xe1,0xba,0x9e == 1E9E # LATIN CAPITAL LETTER SHARP S */ +  x2("(?i:ss)", "\xe1\xba\x9e", 0, 3); +  x2("(?i:xssy)", "xssy", 0, 4); +  x2("(?i:xssy)", "xSsy", 0, 4); +  x2("(?i:xssy)", "xSSy", 0, 4); +  x2("(?i:xssy)", "x\xc5\xbfSy", 0, 5); +  x2("(?i:xssy)", "xs\xc5\xbfy", 0, 5); +  x2("(?i:xssy)", "x\xc3\x9fy", 0, 4); +  x2("(?i:xssy)", "x\xe1\xba\x9ey", 0, 5); +  x2("(?i:\xc3\x9f)", "ss", 0, 2); +  x2("(?i:\xc3\x9f)", "SS", 0, 2); +  x2("(?i:[\xc3\x9f])", "ss", 0, 2); +  x2("(?i:[\xc3\x9f])", "SS", 0, 2); +  x2("(?i)(?<!ss)z", "qqz", 2, 3);    x2("(?i:[A-Z])", "a", 0, 1);    x2("(?i:[f-m])", "H", 0, 1);    x2("(?i:[f-m])", "h", 0, 1); @@ -603,6 +625,7 @@ extern int main(int argc, char* argv[])    x2("(?:()|())*\\2", "abc", 0, 0);    x2("(?:()|()|())*\\3\\1", "abc", 0, 0);    x2("(|(?:a(?:\\g'1')*))b|", "abc", 0, 2); +  x2("^(\"|)(.*)\\1$", "XX", 0, 2);    x2("(?~)", "", 0, 0);    x2("(?~)", "A", 0, 0); | 
