From 3f06724cad3c61d49071cd189ab97fe2f57602bb Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Wed, 13 Sep 2017 15:53:21 +0200 Subject: [PATCH] test: Fixed CommandlineTestSuite changed TestSettings.xml --- .gitignore | 1 + bin/test/data/CommandlineTestSuite/.gitkeep | 0 .../commands/CommandlineCommandConfig.cpp | 2 +- src/test/CommandlineTestSuite.h | 13 +++++++------ 4 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 bin/test/data/CommandlineTestSuite/.gitkeep diff --git a/.gitignore b/.gitignore index 457d4da1..593d94f6 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ /bin/test/data/log/ /bin/test/data/temp.xml /bin/test/data/TestSettings.xml +/bin/test/data/CommandlineTestSuite/settings.xml /java_indexer/target/ diff --git a/bin/test/data/CommandlineTestSuite/.gitkeep b/bin/test/data/CommandlineTestSuite/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/lib/utility/commandline/commands/CommandlineCommandConfig.cpp b/src/lib/utility/commandline/commands/CommandlineCommandConfig.cpp index 68ba8514..d26c3d79 100644 --- a/src/lib/utility/commandline/commands/CommandlineCommandConfig.cpp +++ b/src/lib/utility/commandline/commands/CommandlineCommandConfig.cpp @@ -248,7 +248,7 @@ ReturnStatus CommandConfig::parse(std::vector& args) } } - settings->save(UserPaths::getAppSettingsPath()); + settings->save(); return ReturnStatus::CMD_QUIT; } diff --git a/src/test/CommandlineTestSuite.h b/src/test/CommandlineTestSuite.h index 97ee61ab..3d103b9d 100644 --- a/src/test/CommandlineTestSuite.h +++ b/src/test/CommandlineTestSuite.h @@ -9,15 +9,16 @@ class CommandlineTestSuite: public CxxTest::TestSuite { - public: + void setUp() + { + m_appSettingsPath = ApplicationSettings::getInstance()->getFilePath(); + ApplicationSettings::getInstance()->load(FilePath("data/CommandlineTestSuite/settings.xml")); + } void tearDown() { - } - - void setUp() - { + ApplicationSettings::getInstance()->load(m_appSettingsPath); } void test_commandline_version() @@ -139,5 +140,5 @@ public: } private: - + FilePath m_appSettingsPath; };