summaryrefslogtreecommitdiff
path: root/test/test_back.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2025-03-16 12:06:04 +0100
committerJörg Frings-Fürst <debian@jff.email>2025-03-16 12:06:04 +0100
commit23c9de60f30041419f3925221d4faff4e7a54717 (patch)
tree357c045bdafe11674151335bf4f7d65ae179478f /test/test_back.c
parent35e13e4c9637f5bf7bef6039c8c813207780a174 (diff)
New upstream version 6.9.10upstream/6.9.10upstream
Diffstat (limited to 'test/test_back.c')
-rw-r--r--test/test_back.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_back.c b/test/test_back.c
index 9a6e4a8..52f2e58 100644
--- a/test/test_back.c
+++ b/test/test_back.c
@@ -1,6 +1,6 @@
/*
* test_back.c
- * Copyright (c) 2020-2021 K.Kosako
+ * Copyright (c) 2020-2024 K.Kosako
*/
#ifdef ONIG_ESCAPE_UCHAR_COLLISION
#undef ONIG_ESCAPE_UCHAR_COLLISION
@@ -64,7 +64,7 @@ static void xx(char* pattern, char* str, int from, int to, int mem, int not,
r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)),
(UChar* )(str + SLEN(str)), (UChar* )str,
region, ONIG_OPTION_NONE);
- if (r < ONIG_MISMATCH) {
+ if (r < ONIG_MISMATCH || error_no < ONIG_MISMATCH) {
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
if (error_no == 0) {
@@ -609,7 +609,7 @@ extern int main(int argc, char* argv[])
n("\\A(a|b\\g<1>c)\\k<1+3>\\z", "bbaccb");
x2("(?i)\\A(a|b\\g<1>c)\\k<1+2>\\z", "bBACcbac", 0, 8);
x2("(?i)(?<X>aa)|(?<X>bb)\\k<X>", "BBbb", 0, 4);
- x2("(?:\\k'+1'B|(A)C)*", "ACAB", 4, 4); // relative backref by postitive number
+ x2("(?:\\k'+1'B|(A)C)*", "ACAB", 4, 4); // relative backref by positive number
x2("\\g<+2>(abc)(ABC){0}", "ABCabc", 0, 6); // relative call by positive number
x2("A\\g'0'|B()", "AAAAB", 4, 5);
x3("(A\\g'0')|B", "AAAAB", -1, -1, 1);