mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
add unittest cases for argv_looks_like_help
This commit is contained in:
parent
ffc7f3e9cb
commit
c18caed19b
|
@ -122,6 +122,11 @@ TEST(argv_help) {
|
|||
assert_se(argv_looks_like_help(4, STRV_MAKE("program", "arg1", "arg2", "-h")));
|
||||
assert_se(!argv_looks_like_help(2, STRV_MAKE("program", "arg1")));
|
||||
assert_se(!argv_looks_like_help(4, STRV_MAKE("program", "arg1", "arg2", "--h")));
|
||||
assert_se(!argv_looks_like_help(3, STRV_MAKE("program", "Help", "arg2")));
|
||||
assert_se(argv_looks_like_help(5, STRV_MAKE("program", "--help", "arg1", "-h", "--help")));
|
||||
assert_se(!argv_looks_like_help(4, STRV_MAKE("program","arg1", "arg2", "-H")));
|
||||
assert_se(!argv_looks_like_help(3, STRV_MAKE("program", "--Help", "arg2")));
|
||||
|
||||
}
|
||||
|
||||
static int intro(void) {
|
||||
|
|
Loading…
Reference in a new issue