Make --version exit (#7506)
authorGereon Kremer <nafur42@gmail.com>
Wed, 27 Oct 2021 06:12:00 +0000 (23:12 -0700)
committerGitHub <noreply@github.com>
Wed, 27 Oct 2021 06:12:00 +0000 (06:12 +0000)
This PR adds the missing handler declaration for the --version option.
Fixes #7505.

src/options/main_options.toml
test/regress/CMakeLists.txt
test/regress/regress0/options/version.smt2 [new file with mode: 0644]

index 974bdd155c407a2758783bb2152b31f85a9fc735..0e3f63072eb78e4a04b8b13d88a1c09bbe60999a 100644 (file)
@@ -6,6 +6,7 @@ name   = "Driver"
   short      = "V"
   long       = "version"
   type       = "void"
+  handler    = "showVersion"
   help       = "identify this cvc5 binary"
 
 [[option]]
index 1379c70667d2ab75aa57ba9539f96c3de926a5af..24bb432449ef8c39d87362b86579b2d5c17f16c7 100644 (file)
@@ -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 (file)
index 0000000..755b6cc
--- /dev/null
@@ -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