summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 16:55:10 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 16:55:10 +0100
commit98ab313fe496ae7c792db29c80bf6b23347484ff (patch)
tree3e140e51f430a422b6dd4568fec4884c280b6876 /test
parentb62fc1758f4ae8459e6d7e8386ca547274b4daa2 (diff)
New upstream version 6.7.0upstream/6.7.0
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am2
-rw-r--r--test/test_utf8.c13
2 files changed, 14 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 2930e7f..9643bb0 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -3,7 +3,7 @@ lib_onig = ../src/libonig.la
AM_LDFLAGS = -L$(prefix)/lib
AM_CFLAGS =
-AM_CPPFLAGS = -I../src -I$(includedir)
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(includedir)
TESTS = test_utf8 testc testp testcu
diff --git a/test/test_utf8.c b/test/test_utf8.c
index 31fcfcd..a14cacc 100644
--- a/test/test_utf8.c
+++ b/test/test_utf8.c
@@ -1051,7 +1051,20 @@ extern int main(int argc, char* argv[])
n("^\\X.$", "\xE0\xAE\xA8\xE0\xAE\xBF");
+ // a + COMBINING GRAVE ACCENT (U+0300)
+ x2("h\\Xllo", "ha\xCC\x80llo", 0, 7);
+ x2("\\x40", "@", 0, 1);
+ x2("\\x1", "\x01", 0, 1);
+ x2("\\x{1}", "\x01", 0, 1);
+ x2("\\x{4E38}", "\xE4\xB8\xB8", 0, 3);
+ x2("\\u4E38", "\xE4\xB8\xB8", 0, 3);
+ x2("\\u0040", "@", 0, 1);
+
+ x2("c.*\\b", "abc", 2, 3);
+ x2("\\b.*abc.*\\b", "abc", 0, 3);
+
+ e("\\u040", "@", ONIGERR_INVALID_CODE_POINT_VALUE);
e("(?<abc>\\g<abc>)", "zzzz", ONIGERR_NEVER_ENDING_RECURSION);
e("(?<=(?>abc))", "abc", ONIGERR_INVALID_LOOK_BEHIND_PATTERN);