From 2f025e4e3ab78796b10e603f79b3a95aa9e1662a Mon Sep 17 00:00:00 2001 From: Gereon Kremer Date: Tue, 26 Oct 2021 23:12:00 -0700 Subject: [PATCH] Make --version exit (#7506) This PR adds the missing handler declaration for the --version option. Fixes #7505. --- src/options/main_options.toml | 1 + test/regress/CMakeLists.txt | 1 + test/regress/regress0/options/version.smt2 | 3 +++ 3 files changed, 5 insertions(+) create mode 100644 test/regress/regress0/options/version.smt2 diff --git a/src/options/main_options.toml b/src/options/main_options.toml index 974bdd155..0e3f63072 100644 --- a/src/options/main_options.toml +++ b/src/options/main_options.toml @@ -6,6 +6,7 @@ name = "Driver" short = "V" long = "version" type = "void" + handler = "showVersion" help = "identify this cvc5 binary" [[option]] diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index 1379c7066..24bb43244 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -775,6 +775,7 @@ set(regress_0_tests regress0/options/set-and-get-options.smt2 regress0/options/statistics.smt2 regress0/options/stream-printing.smt2 + regress0/options/version.smt2 regress0/parallel-let.smt2 regress0/parser/as.smt2 regress0/parser/bv_arity_smt2.6.smt2 diff --git a/test/regress/regress0/options/version.smt2 b/test/regress/regress0/options/version.smt2 new file mode 100644 index 000000000..755b6ccca --- /dev/null +++ b/test/regress/regress0/options/version.smt2 @@ -0,0 +1,3 @@ +; COMMAND-LINE: --version +; EXPECT: This is cvc5 version +; SCRUBBER: grep -o "This is cvc5 version" \ No newline at end of file -- 2.30.2