summaryrefslogtreecommitdiff
path: root/src/gui/windowmanager_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-07 04:05:07 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-07 04:05:07 +0300
commit37dfcd854b76707dbf783fc0d371081f5fcaf7d2 (patch)
treeea04b542cffa92c5fbc67f39b5b5183c12917a5b /src/gui/windowmanager_unittest.cc
parentd2ed5ba429329d435e6d010acad3b14ae9179c7d (diff)
downloadplus-37dfcd854b76707dbf783fc0d371081f5fcaf7d2.tar.gz
plus-37dfcd854b76707dbf783fc0d371081f5fcaf7d2.tar.bz2
plus-37dfcd854b76707dbf783fc0d371081f5fcaf7d2.tar.xz
plus-37dfcd854b76707dbf783fc0d371081f5fcaf7d2.zip
Fix tests after last changes.
Diffstat (limited to 'src/gui/windowmanager_unittest.cc')
-rw-r--r--src/gui/windowmanager_unittest.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/windowmanager_unittest.cc b/src/gui/windowmanager_unittest.cc
index 58f85ec2a..78bd85ab8 100644
--- a/src/gui/windowmanager_unittest.cc
+++ b/src/gui/windowmanager_unittest.cc
@@ -20,7 +20,9 @@
#include "catch.hpp"
#include "client.h"
+#include "configmanager.h"
#include "configuration.h"
+#include "dirs.h"
#include "graphicsmanager.h"
#include "settings.h"
#include "textcommand.h"
@@ -122,6 +124,8 @@
#include "utils/translation/translationmanager.h"
+#include <stdio.h>
+
#include "debug.h"
extern QuitDialog *quitDialog;
@@ -161,6 +165,16 @@ TEST_CASE("Windows tests", "windowmanager")
theme = new Theme;
Theme::selectSkin();
+ Dirs::initRootDir();
+ Dirs::initHomeDir();
+
+ const std::string cfgName = settings.configDir +
+ "/nonexistserver/config.xml";
+ ::remove(cfgName.c_str());
+
+ ConfigManager::initConfiguration();
+ ConfigManager::initServerConfig("nonexistserver");
+
localPlayer = new LocalPlayer(static_cast<BeingId>(1),
BeingTypeId_zero);