summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-08 20:43:31 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-08 20:43:31 +0300
commitfb98e89a3283405ebc8100a27d6dbc580ad184f7 (patch)
treebe68be7c9489f475f39468fdbeb6663101630713 /src
parentdb2c855bf9d54fe512fa695ee6bf6c314331fe7c (diff)
downloadmanaplus-fb98e89a3283405ebc8100a27d6dbc580ad184f7.tar.gz
manaplus-fb98e89a3283405ebc8100a27d6dbc580ad184f7.tar.bz2
manaplus-fb98e89a3283405ebc8100a27d6dbc580ad184f7.tar.xz
manaplus-fb98e89a3283405ebc8100a27d6dbc580ad184f7.zip
Use special name for main configuration file in unit tests.
Diffstat (limited to 'src')
-rw-r--r--src/configmanager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/configmanager.cpp b/src/configmanager.cpp
index 8f0ec3002..e9c130fc1 100644
--- a/src/configmanager.cpp
+++ b/src/configmanager.cpp
@@ -134,10 +134,15 @@ void ConfigManager::initConfiguration()
std::string configPath;
+#ifndef UNITTESTS
if (settings.options.test.empty())
configPath = settings.configDir + "/config.xml";
else
configPath = settings.configDir + "/test.xml";
+#else // UNITTESTS
+
+ configPath = settings.configDir + "/unittestconfig.xml";
+#endif // UNITTESTS
FILE *configFile = fopen(configPath.c_str(), "r");
if (!configFile)