Skip to content

Commit a9d687e

Browse files
committed
src/test: Add an extra test case to nxt_term_parse_test.c
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 <a.clayton@nginx.com>
1 parent b358e7f commit a9d687e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test/nxt_term_parse_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ static const nxt_term_parse_test_t terms[] = {
2323
{ nxt_string("1w d"), 0, -1 },
2424
{ nxt_string("w"), 0, -1 },
2525
{ nxt_string("1d 1w"), 0, -1 },
26+
{ nxt_string("1 "), 1, 1 },
2627
{ nxt_string("25d"), 0, -2 },
2728
{ nxt_string("300"), 1, 300 },
2829
{ nxt_string("300"), 0, 300000 },

0 commit comments

Comments
 (0)