Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit 013049e

Browse files
committed
Add test that prints command line help menu.
1 parent 5b50f3b commit 013049e

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ config: mk_build
6161

6262
custom_tests:
6363
$(CC) -O2 -g -I src/ $(shell $(PKG_CONF) --libs json-c) $(BUILD_DIR)/$(CMD_LINE_OUT) $(BUILD_DIR)/$(CONFIG_OUT) -o $(BUILD_DIR)/test_cfg_print $(TESTS_DIR)/cfg_print.c
64+
$(CC) -O2 -g -I src/ $(shell $(PKG_CONF) --libs json-c) $(BUILD_DIR)/$(CMD_LINE_OUT) $(BUILD_DIR)/$(CONFIG_OUT) -o $(BUILD_DIR)/test_cmd_help $(TESTS_DIR)/cmd_help.c
6465

6566
# Install (copy base config file if it doesn't already exist).
6667
install:

tests/cmd_help.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include <stdio.h>
2+
#include <stdlib.h>
3+
#include <string.h>
4+
#include <unistd.h>
5+
#include <linux/types.h>
6+
#include <getopt.h>
7+
#include <errno.h>
8+
9+
#include <cmd_line.h>
10+
11+
int main(int argc, char *argv[])
12+
{
13+
print_cmd_help();
14+
15+
return EXIT_SUCCESS;
16+
}

0 commit comments

Comments
 (0)