From 0f811d1c323bae50de18baa56284b737a1be5bcd Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Fri, 22 Feb 2019 14:11:55 +0900 Subject: [PATCH] add test cases for improve coverage --- test/test_utf8.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/test_utf8.c b/test/test_utf8.c index 1397a2f..ef2f921 100644 --- a/test/test_utf8.c +++ b/test/test_utf8.c @@ -656,6 +656,25 @@ extern int main(int argc, char* argv[]) x2("[a]*[b]", "aab", 0, 3); // up coverage n("a*\\W", "aaa"); // up coverage n("(?W)a*\\W", "aaa"); // up coverage + x2("(?<=ab(?<=ab))", "ab", 2, 2); // up coverage + x2("(?a)(?b)(\\k)+", "abbaab", 0, 6); // up coverage + x2("()(\\1)(\\2)", "abc", 0, 0); // up coverage + x2("((?(a)b|c))(\\1)", "abab", 0, 4); // up coverage + x2("(?$|b\\g)", "bbb", 0, 3); // up coverage + x2("(?(?(a)a|b)|c\\g)", "cccb", 0, 4); // up coverage + x2("(a)(?(1)a*|b*)+", "aaaa", 0, 4); // up coverage + x2("[[^abc]&&cde]*", "de", 0, 2); // up coverage + n("(a){10}{10}", "aa"); // up coverage + x2("(?:a?)+", "aa", 0, 2); // up coverage + x2("(?:a?)*?", "a", 0, 0); // up coverage + x2("(?:a*)*?", "a", 0, 0); // up coverage + x2("(?:a+?)*", "a", 0, 1); // up coverage + x2("\\h", "5", 0, 1); // up coverage + x2("\\H", "z", 0, 1); // up coverage + x2("[\\h]", "5", 0, 1); // up coverage + x2("[\\H]", "z", 0, 1); // up coverage + x2("[\\o{101}]", "A", 0, 1); // up coverage + x2("[\\u0041]", "A", 0, 1); // up coverage x2("(?~)", "", 0, 0); x2("(?~)", "A", 0, 0); -- 2.40.0