From 3be10e6264ee8a817c4b6ed744a2a34cf99cecea Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 3 Mar 2025 00:09:01 +0100 Subject: Add a basic test of the encode CLI. --- src/lib/encode_cli.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lib/encode_cli.cc') diff --git a/src/lib/encode_cli.cc b/src/lib/encode_cli.cc index 6209d4c01..d7c4541cb 100644 --- a/src/lib/encode_cli.cc +++ b/src/lib/encode_cli.cc @@ -271,6 +271,9 @@ encode_cli(int argc, char* argv[], function out, function export_filename; bool hints = false; + /* This makes it possible to call getopt several times in the same executable, for tests */ + optind = 0; + int option_index = 0; while (true) { static struct option long_options[] = { -- cgit v1.2.3