diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-01-04 18:25:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-01-04 18:25:48 +0300 |
commit | 9fefb2942865846ccb7dbdac4ebd4515b8c851a2 (patch) | |
tree | c3e805eb002d03c286de2a3fe37f450f6279f82c /src/utils/stringutils_unittest.cc | |
parent | 76ad2d74012c408788473c3b495076c96666b27c (diff) | |
download | manaplus-9fefb2942865846ccb7dbdac4ebd4515b8c851a2.tar.gz manaplus-9fefb2942865846ccb7dbdac4ebd4515b8c851a2.tar.bz2 manaplus-9fefb2942865846ccb7dbdac4ebd4515b8c851a2.tar.xz manaplus-9fefb2942865846ccb7dbdac4ebd4515b8c851a2.zip |
Add physfs deinit function for unit tests. But not using it for now.
Diffstat (limited to 'src/utils/stringutils_unittest.cc')
-rw-r--r-- | src/utils/stringutils_unittest.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utils/stringutils_unittest.cc b/src/utils/stringutils_unittest.cc index a8347cdd5..481289087 100644 --- a/src/utils/stringutils_unittest.cc +++ b/src/utils/stringutils_unittest.cc @@ -19,13 +19,17 @@ */ #include "catch.hpp" +#include "logger.h" +#include "utils/physfstools.h" #include "utils/stringutils.h" #include "resources/iteminfo.h" #include "resources/db/itemdb.h" +#include "resources/resourcemanager/resourcemanager.h" + #include "debug.h" TEST_CASE("stringuntils trim 1") @@ -619,6 +623,13 @@ TEST_CASE("stringuntils escapeString") TEST_CASE("stringuntils replaceItemLinks") { + PHYSFS_init("manaplus"); + dirSeparator = "/"; + logger = new Logger(); + ResourceManager::init(); + resourceManager->addToSearchPath("data", Append_false); + resourceManager->addToSearchPath("../data", Append_false); + ItemDB::NamedItemInfos &namedInfos = ItemDB::getNamedItemInfosTest(); ItemDB::ItemInfos &infos = ItemDB::getItemInfosTest(); ItemInfo *info = new ItemInfo; @@ -833,4 +844,6 @@ TEST_CASE("stringuntils replaceItemLinks") replaceItemLinks(str); REQUIRE(str == "[[test name 1 ,test name2[] test name 1]"); } + ResourceManager::deleteInstance(); +// PhysFs::deinit(); } |