aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/client_main.c
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-07-07 22:13:00 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-07-07 22:49:27 +0200
commit9ba12e5496c49f48f40ad52e816641dfdbb0474e (patch)
tree47c04ea350c077219eb5dca461e182551e26d954 /src/client_main.c
parentsupport code coverage report generation (diff)
downloadcimple-9ba12e5496c49f48f40ad52e816641dfdbb0474e.tar.gz
cimple-9ba12e5496c49f48f40ad52e816641dfdbb0474e.zip
test: add some basic command-line usage tests
Diffstat (limited to '')
-rw-r--r--src/client_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client_main.c b/src/client_main.c
index 0a68a55..ac092d1 100644
--- a/src/client_main.c
+++ b/src/client_main.c
@@ -24,7 +24,9 @@ static struct settings default_settings(void)
const char *get_usage_string(void)
{
- return "[-h|--help] [-V|--version] [-v|--verbose] [-H|--host HOST] [-p|--port PORT]";
+ /* clang-format off */
+ return "[-h|--help] [-V|--version] [-v|--verbose] [-H|--host HOST] [-p|--port PORT] ACTION [ARG...]";
+ /* clang-format on */
}
static int parse_settings(struct settings *settings, int argc, char *argv[])
@@ -84,7 +86,7 @@ int main(int argc, char *argv[])
if (ret < 0)
return ret;
- ret = client_main(client, &settings, (const char **)argv + optind);
+ ret = client_main(client, &settings, argc - optind, (const char **)argv + optind);
if (ret < 0)
goto destroy_client;