Skip to content

Commit

Permalink
add some test cases for #292
Browse files Browse the repository at this point in the history
  • Loading branch information
kkos committed Apr 1, 2024
1 parent 23dfc82 commit 32c6da9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion test/test_syntax.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* test_syntax.c
* Copyright (c) 2019-2021 K.Kosako
* Copyright (c) 2019-2024 K.Kosako
*/
#ifdef ONIG_ESCAPE_UCHAR_COLLISION
#undef ONIG_ESCAPE_UCHAR_COLLISION
Expand Down Expand Up @@ -340,6 +340,9 @@ extern int main(int argc, char* argv[])
test_BRE_anchors();
x2("zz\\|^ab", "ab", 0, 2);
x2("ab$\\|zz", "ab", 0, 2);
x2("*", "*", 0, 1);
x2("^*", "*", 0, 1);
x2("abc\\|?", "?", 0, 1);

Syntax = ONIG_SYNTAX_PERL_NG;

Expand Down
3 changes: 2 additions & 1 deletion test/test_utf8.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* test_utf8.c
* Copyright (c) 2019-2022 K.Kosako
* Copyright (c) 2019-2024 K.Kosako
*/
#ifdef ONIG_ESCAPE_UCHAR_COLLISION
#undef ONIG_ESCAPE_UCHAR_COLLISION
Expand Down Expand Up @@ -1749,6 +1749,7 @@ extern int main(int argc, char* argv[])
e("(?m:*)", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED);
x2("(?:)*", "abc", 0, 0);
e("^*", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID);
e("abc|?", "", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED);

fprintf(stdout,
"\nRESULT SUCC: %4d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n",
Expand Down

0 comments on commit 32c6da9

Please sign in to comment.