diff options
author | Andrew Clayton <a.clayton@nginx.com> | 2024-09-24 14:55:04 +0100 |
---|---|---|
committer | Andrew Clayton <a.clayton@nginx.com> | 2024-09-24 16:01:05 +0100 |
commit | a9d687e77059e801e956e7b7bb59637aa4708483 (patch) | |
tree | 33eb4aac314bafd92de70e30270c85d9ac403cf1 | |
parent | b358e7fb6af71ec44bb24acc21a21955f2052ff1 (diff) | |
download | unit-a9d687e77059e801e956e7b7bb59637aa4708483.tar.gz unit-a9d687e77059e801e956e7b7bb59637aa4708483.tar.bz2 |
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>
-rw-r--r-- | src/test/nxt_term_parse_test.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/nxt_term_parse_test.c b/src/test/nxt_term_parse_test.c index 83ae4931..ceae3fe5 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 }, |