Add more tests for command line parser

This commit is contained in:
Alex Kotov 2020-12-02 02:56:30 +05:00
parent 2707c56c27
commit 93e764c1b8
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}