Skip to content

Commit

Permalink
src/test: Add an extra test case to nxt_term_parse_test.c
Browse files Browse the repository at this point in the history
The function nxt_term_parse() is able to take strings with trailing
whitespace e.g. "1w1d ", add a test case to cover such things.

Signed-off-by: Andrew Clayton <[email protected]>
  • Loading branch information
ac000 committed Sep 24, 2024
1 parent b358e7f commit a9d687e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/test/nxt_term_parse_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ static const nxt_term_parse_test_t terms[] = {
{ nxt_string("1w d"), 0, -1 },
{ nxt_string("w"), 0, -1 },
{ nxt_string("1d 1w"), 0, -1 },
{ nxt_string("1 "), 1, 1 },
{ nxt_string("25d"), 0, -2 },
{ nxt_string("300"), 1, 300 },
{ nxt_string("300"), 0, 300000 },
Expand Down

0 comments on commit a9d687e

Please sign in to comment.