Skip to content

Commit

Permalink
Add test cases for maximal wide characters.
Browse files Browse the repository at this point in the history
The parser accepts an unlimited number of hexadecimal digits, but will
overflow after 32, so test 32 and 33 for now.
  • Loading branch information
dag-erling committed Jul 30, 2024
1 parent bec296b commit c7cc774
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/retest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,8 @@ main(int argc, char **argv)
test_nexec("\000", 1, 0, REG_OK, 0, 1, END);
test_comp("\\x{}r", REG_EXTENDED, 0);
test_nexec("\000r", 2, 0, REG_OK, 0, 2, END);
test_comp("\\x{00000000000000000000000000000000}", REG_EXTENDED, 0);
test_comp("\\x{000000000000000000000000000000000}", REG_EXTENDED, REG_EBRACE);

/* Tests for (?inrU-inrU) and (?inrU-inrU:) */
test_comp("foo(?i)bar", REG_EXTENDED, 0);
Expand Down

0 comments on commit c7cc774

Please sign in to comment.