From: K.Kosako Date: Tue, 27 Feb 2018 04:16:46 +0000 (+0900) Subject: use (*ONLY(n)) in sample/callout.c X-Git-Tag: v6.8.0~140 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b7929dae0b54ee1bcc1c9d637abf55c12f50f0c;p=onig use (*ONLY(n)) in sample/callout.c --- diff --git a/sample/callout.c b/sample/callout.c index c160c94..0fd2030 100644 --- a/sample/callout.c +++ b/sample/callout.c @@ -232,7 +232,6 @@ extern int main(int argc, char* argv[]) (void)onig_set_callout_of_contents(progress_callout_func); (void)onig_set_retraction_callout_of_contents(retraction_callout_func); - // callout of code test("a+(?{foo bar baz...}+)$", "aaab"); test("(?{{!{}#$%&'()=-~^|[_]`@*:+;<>?/.\\,}})c", "abc"); @@ -250,6 +249,10 @@ extern int main(int argc, char* argv[]) test("abc(d|(*ERROR(-999)))", "abc"); test("ab(*bar(372,I am a bar's argument,あ))c(*FAIL)", "abc"); test("ab(*bar(1234567890))", "abc"); + test("(?:a(*ONLY(2))|b)*", "abbabbabbabb"); + test("(?:(*ONLY(2))a|b)*", "abbabbabbabb"); + test("(?:(*ONLY)a|b)*", "bbbbbabbbbbabbbbb"); + test("(?:(*ONLY(3))a|(*ONLY(4))b)*", "bbbaabbab"); onig_end(); return 0;