From 0d2ee355ee669f6e5b1caf7b73b9cc9f1e822625 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Wed, 10 Dec 2025 22:55:34 -0600 Subject: [PATCH] tests: Fix intr --version --- tests/bin/intr.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/bin/intr.c b/tests/bin/intr.c index 867c5c295..fc16db8f9 100644 --- a/tests/bin/intr.c +++ b/tests/bin/intr.c @@ -5,11 +5,13 @@ #include 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;