From cd807137912900c9a7a69270484b2ad3b79fac67 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Fri, 24 May 2024 10:26:30 +0900 Subject: [PATCH] add some test cases for #295 --- test/test_syntax.c | 10 ++++++++++ test/test_utf8.c | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/test/test_syntax.c b/test/test_syntax.c index f54c8bfd..272d9dda 100644 --- a/test/test_syntax.c +++ b/test/test_syntax.c @@ -205,6 +205,16 @@ static int test_look_behind() x2("(?<=a|b)c", "abc", 2, 3); x2("(?<=a|(.))\\1", "abcc", 3, 4); + // #295 + n("(?)|(?<=(\\k<1>))", ""); x2("(a|\\k<2>)|(?<=(\\k<1>))", "a", 0, 1); x2("(a|\\k<2>)|(?<=b(\\k<1>))", "ba", 1, 2); + // #295 + n("(?|b))", "aab", 0, 3); x2("((?(a)\\g<1>))", "aab", 0, 2);