summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-12-21 20:06:28 +0100
committerJörg Frings-Fürst <debian@jff.email>2018-12-21 20:06:28 +0100
commitf883fa5bd37b6420f5dc25027a68289c64028063 (patch)
tree80452d3b1840e553402538830e903ed9fecdb3a8 /test
parent66dfd6613394a8903701840bbc9d67de537e597e (diff)
parentf1aff0cc17934fa45d9520dae6986562e033cb8f (diff)
Merge branch 'release/debian/6.9.1-1'debian/6.9.1-1
Diffstat (limited to 'test')
-rw-r--r--test/.gitignore4
-rw-r--r--test/test_utf8.c33
-rw-r--r--test/testc.c6
3 files changed, 29 insertions, 14 deletions
diff --git a/test/.gitignore b/test/.gitignore
deleted file mode 100644
index 04918c1..0000000
--- a/test/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/test_utf8
-/testc
-/testcu
-/testp
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);
diff --git a/test/testc.c b/test/testc.c
index e37665a..4aa8807 100644
--- a/test/testc.c
+++ b/test/testc.c
@@ -10,11 +10,7 @@
#include "oniguruma.h"
#endif
-#ifdef HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <string.h>
#define SLEN(s) strlen(s)