From 5463c14872d21942c1cad4f6738bde8e77d64771 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Thu, 1 Feb 2018 11:24:55 -0800 Subject: [PATCH] Remove --version test case because it doesn't work --- src/cryfs-cli/program_options/Parser.cpp | 2 +- test/cryfs-cli/program_options/ParserTest.cpp | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/cryfs-cli/program_options/Parser.cpp b/src/cryfs-cli/program_options/Parser.cpp index 9ebf807f..b0802deb 100644 --- a/src/cryfs-cli/program_options/Parser.cpp +++ b/src/cryfs-cli/program_options/Parser.cpp @@ -182,5 +182,5 @@ void Parser::_addPositionalOptionForBaseDir(po::options_description *desc, po::p [[noreturn]] void Parser::_showVersionAndExit() { // no need to show version because it was already shown in the CryFS header before parsing program options - exit(1); + exit(0); } diff --git a/test/cryfs-cli/program_options/ParserTest.cpp b/test/cryfs-cli/program_options/ParserTest.cpp index 45539207..a02d4cf4 100644 --- a/test/cryfs-cli/program_options/ParserTest.cpp +++ b/test/cryfs-cli/program_options/ParserTest.cpp @@ -55,16 +55,6 @@ TEST_F(ProgramOptionsParserTest, ShowCiphers) { ); } - -TEST_F(ProgramOptionsParserTest, Version) { - string expected = "CryFS Version " + gitversion::VersionString(); - EXPECT_EXIT( - parse({"./myExecutable", "--version"}), - ::testing::ExitedWithCode(0), - expected.c_str() - ); -} - TEST_F(ProgramOptionsParserTest, BaseDir_Absolute) { ProgramOptions options = parse({"./myExecutable", "/home/user/baseDir", "/home/user/mountDir"}); EXPECT_EQ("/home/user/baseDir", options.baseDir());