From a9d687e77059e801e956e7b7bb59637aa4708483 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Tue, 24 Sep 2024 14:55:04 +0100 Subject: [PATCH] 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 --- src/test/nxt_term_parse_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/nxt_term_parse_test.c b/src/test/nxt_term_parse_test.c index 83ae49316..ceae3fe5b 100644 --- a/src/test/nxt_term_parse_test.c +++ b/src/test/nxt_term_parse_test.c @@ -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 },