]> granicus.if.org Git - onig/commitdiff
add some test cases
authorK.Kosako <kkosako0@gmail.com>
Thu, 28 Mar 2019 01:25:33 +0000 (10:25 +0900)
committerK.Kosako <kkosako0@gmail.com>
Thu, 28 Mar 2019 01:25:33 +0000 (10:25 +0900)
test/test_utf8.c

index 109433c38becd96732b32794e71b17a6b36dbef7..cf5e43888e42495d2a9c7fd180f2bcce7b2d73be 100644 (file)
@@ -1190,8 +1190,10 @@ extern int main(int argc, char* argv[])
   x2("(?(?{....})123|456)", "123", 0, 3);
   x2("(?(*FAIL)123|456)", "456", 0, 3);
 
-  x2("\\g'0'++{,0}",  "abcdefgh", 0, 0);
-  x2("\\g'0'++{,0}?", "abcdefgh", 0, 0);
+  x2("\\g'0'++{,0}",   "abcdefgh", 0, 0);
+  x2("\\g'0'++{,0}?",  "abcdefgh", 0, 0);
+  x2("\\g'0'++{,0}b",  "abcdefgh", 1, 2);
+  x2("\\g'0'++{,0}?def", "abcdefgh", 3, 6);
 
   e("\\u040", "@", ONIGERR_INVALID_CODE_POINT_VALUE);
   e("(?<abc>\\g<abc>)", "zzzz", ONIGERR_NEVER_ENDING_RECURSION);