tests: Fix intr --version

This commit is contained in:
Nicolas Williams
2025-12-10 22:55:34 -06:00
parent 7cc3f3bbc8
commit 0d2ee355ee

View File

@@ -5,11 +5,13 @@
#include <time.h>
static int help_flag;
static int version_flag;
static int timeout = 3;
static struct getargs args[] = {
{ "help", 'h', arg_flag, &help_flag, NULL, NULL },
{ "timeout", 't', arg_integer, &timeout, NULL, NULL }
{ "timeout", 't', arg_integer, &timeout, NULL, NULL },
{ "version", 0, arg_flag, &version_flag, "Print version", NULL },
};
static int nargs = sizeof(args) / sizeof(args[0]);
@@ -45,6 +47,11 @@ main(int argc, char **argv)
if (help_flag)
usage(0);
if (version_flag) {
print_version (NULL);
return 0;
}
argc -= optidx;
argv += optidx;