From 93e764c1b83a05eb23af3f2c69f65653fb3493e9 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Wed, 2 Dec 2020 02:56:30 +0500 Subject: [PATCH] Add more tests for command line parser --- tests/test_cmdline.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_cmdline.c b/tests/test_cmdline.c index c6b1675..7ec455a 100644 --- a/tests/test_cmdline.c +++ b/tests/test_cmdline.c @@ -41,8 +41,10 @@ int main() test(" foo bar ", 0, 0, true, "", 2, argv_foo_bar); test("foo bar car", 0, 0, true, "", 3, argv_foo_bar_car); + test("foo bar car", 3, 4, true, "", 3, argv_foo_bar_car); + test("foo bar car", 2, 0, false, "too many args", 0, argv0); - test("foo bar car", 0, 2, false, "arg too long", 0, argv0); + test("foo bar car", 0, 3, false, "arg too long", 0, argv0); return 0; }