]> granicus.if.org Git - onig/commitdiff
add test cases for absent clear
authorK.Kosako <kkosako0@gmail.com>
Sun, 30 Jul 2017 08:29:56 +0000 (17:29 +0900)
committerK.Kosako <kkosako0@gmail.com>
Sun, 30 Jul 2017 08:29:56 +0000 (17:29 +0900)
test/testc.c

index a99b92154cdd25013357ac3057d6bac03db13e3a..66a6955f7d60534ccb838148d3768e891b61e1ce 100644 (file)
@@ -665,9 +665,12 @@ extern int main(int argc, char* argv[])
   x2("(?~|abc)a*", "aaaaaabc", 0, 5);
   x2("(?~|abc)a*z|aaaaaabc", "aaaaaabc", 0, 8);
   x2("(?~|aaaaaa)a*", "aaaaaa", 0, 0);
-
   x2("(?~|abc)aaaa|aaaabc", "aaaabc", 0, 6);
   x2("(?>(?~|abc))aaaa|aaaabc", "aaaabc", 0, 6);
+  x2("(?~|)a", "a", 0, 1);
+  n("(?~|a)a", "a");
+  x2("(?~|a)(?~|)a", "a", 0, 1);
+  x2("(?~|a).*(?~|)a", "bbbbbbbbbbbbbbbbbbbba", 0, 21);
 
   /*
     < ifndef IGNORE_EUC_JP >