From c09895d9593f71c03443687e1f1b828497d9a53a Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Tue, 15 Aug 2017 11:14:40 +0900 Subject: [PATCH] add test cases for ascii mode options --- test/test_utf8.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test_utf8.c b/test/test_utf8.c index 027c400..6c3515c 100644 --- a/test/test_utf8.c +++ b/test/test_utf8.c @@ -962,6 +962,17 @@ extern int main(int argc, char* argv[]) n("[^[\\p{^Cntrl}]&&[^\\x{104a}]]", "こ"); n("[^\\p{Cntrl}||[^\\x{104a}]]", "こ"); + x2("(?-W:\\p{Word})", "こ", 0, 3); + n("(?W:\\p{Word})", "こ"); + x2("(?W:\\p{Word})", "k", 0, 1); + x2("(?-W:[[:word:]])", "こ", 0, 3); + n("(?W:[[:word:]])", "こ"); + x2("(?-D:\\p{Digit})", "3", 0, 3); + n("(?D:\\p{Digit})", "3"); + x2("(?-S:\\p{Space})", "\xc2\x85", 0, 2); + n("(?S:\\p{Space})", "\xc2\x85"); + x2("(?-P:\\p{Word})", "こ", 0, 3); + n("(?P:\\p{Word})", "こ"); e("(?\\g)", "zzzz", ONIGERR_NEVER_ENDING_RECURSION); -- 2.40.0