summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-05-02 17:29:00 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-05-02 17:29:00 +0200
commit7f5dccbe5fee224ecfeceec6e206cca67ad58452 (patch)
tree2891c20f6f89a6a9ca7a967ca2245c0f8370d5b4 /test
parentfd4ff4e58174679784d7698880717eefc9399ba7 (diff)
parent83ea1be016fd5fc27ee721cf62a18716675815dc (diff)
Update upstream source from tag 'upstream/6.8.2'
Update to upstream version '6.8.2' with Debian dir 36d9b721af0175dd84faa77cc24739097d03e9bb
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am7
-rw-r--r--test/test_utf8.c4
2 files changed, 10 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 6559a77..2dde7d6 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -9,7 +9,7 @@ TESTS = test_utf8 testc testp testcu
check_PROGRAMS = test_utf8 testc testp testcu
-test: test_utf8 testc testp testcu
+test: test_uchar test_utf8 testc testp testcu
@echo "[Oniguruma API, UTF-8 check]"
@./test_utf8 | grep RESULT
@echo "[Oniguruma API, ASCII/EUC-JP check]"
@@ -19,6 +19,11 @@ test: test_utf8 testc testp testcu
@echo "[Oniguruma API, UTF-16 check]"
@./testcu | grep RESULT
+test_uchar:
+ @echo "[UChar in oniguruma.h check]"
+ @grep "\(^\|[^g]\)UChar" $(top_srcdir)/src/oniguruma.h
+ @echo ""
+
test_utf8_SOURCES = test_utf8.c
test_utf8_LDADD = $(lib_onig)
diff --git a/test/test_utf8.c b/test/test_utf8.c
index 286158d..bd3ed16 100644
--- a/test/test_utf8.c
+++ b/test/test_utf8.c
@@ -595,6 +595,10 @@ extern int main(int argc, char* argv[])
x2("a\\Kb", "ab", 1, 2);
x2("(a\\Kb|ac\\Kd)", "acd", 2, 3);
x2("(a\\Kb|\\Kac\\K)*", "acababacab", 9, 10);
+ x2("(?:()|())*\\1", "abc", 0, 0);
+ x2("(?:()|())*\\2", "abc", 0, 0);
+ x2("(?:()|()|())*\\3\\1", "abc", 0, 0);
+ x2("(|(?:a(?:\\g'1')*))b|", "abc", 0, 2);
x2("(?~)", "", 0, 0);
x2("(?~)", "A", 0, 0);