diff --git a/tests/test_cmdline.c b/tests/test_cmdline.c index 43effa3..d3f6c51 100644 --- a/tests/test_cmdline.c +++ b/tests/test_cmdline.c @@ -1,6 +1,7 @@ #include #include +#include static const unsigned int ARGV_COUNT_MAX = 1024; static const unsigned int ARG_SIZE_MAX = 4096; @@ -8,7 +9,7 @@ static const unsigned int ARG_SIZE_MAX = 4096; int main() { char error_msg[KERNAUX_CMDLINE_ERROR_MSG_SIZE_MAX]; - unsigned int argc; + unsigned int argc = 1234; char *argv[ARGV_COUNT_MAX]; char buffer[ARGV_COUNT_MAX * ARG_SIZE_MAX]; @@ -22,5 +23,12 @@ int main() ARG_SIZE_MAX )); + assert(strcmp(error_msg, "") == 0); + assert(argc == 0); + + for (unsigned int index = 0; index < ARGV_COUNT_MAX; ++index) { + assert(argv[index] == KERNAUX_NULL); + } + return 0; }