summaryrefslogtreecommitdiff
path: root/src/integrity_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-01 04:50:26 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-01 04:50:26 +0300
commit7df01a8695e46e7e8cce603782f0e16caf54169b (patch)
tree030a0125429c9605c24ad74e3d523fd900f155cd /src/integrity_unittest.cc
parent0f172abb004bed203f8bf329e4f43eb174a8a58c (diff)
downloadmv-7df01a8695e46e7e8cce603782f0e16caf54169b.tar.gz
mv-7df01a8695e46e7e8cce603782f0e16caf54169b.tar.bz2
mv-7df01a8695e46e7e8cce603782f0e16caf54169b.tar.xz
mv-7df01a8695e46e7e8cce603782f0e16caf54169b.zip
Fix tests running without physfs.
Diffstat (limited to 'src/integrity_unittest.cc')
-rw-r--r--src/integrity_unittest.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/integrity_unittest.cc b/src/integrity_unittest.cc
index 58e22772a..73ee5cee3 100644
--- a/src/integrity_unittest.cc
+++ b/src/integrity_unittest.cc
@@ -221,7 +221,7 @@ TEST_CASE("integrity tests", "integrity")
VirtFs::addZipToSearchPath("data/test/test.zip", Append_false);
VirtFs::addZipToSearchPath("../data/test/test.zip", Append_false);
Image *const image = Loader::getImage(
- "hide.png");
+ "dir/hide.png");
VirtFs::removeZipFromSearchPath("data/test/test.zip");
VirtFs::removeZipFromSearchPath("../data/test/test.zip");
REQUIRE(image != nullptr);
@@ -259,7 +259,11 @@ TEST_CASE("integrity tests", "integrity")
SDL_RWclose(rw);
VirtFs::removeZipFromSearchPath("data/test/test.zip");
VirtFs::removeZipFromSearchPath("../data/test/test.zip");
+ VirtFs::addDirToSearchPath("data/test", Append_true);
+ VirtFs::addDirToSearchPath("../data/test", Append_true);
REQUIRE(compareBuffers(buf) == true);
+ VirtFs::removeDirFromSearchPath("data/test");
+ VirtFs::removeDirFromSearchPath("../data/test");
}
#ifdef USE_PHYSFS
@@ -403,7 +407,11 @@ TEST_CASE("integrity tests", "integrity")
VirtFs::removeZipFromSearchPath("data/test/test.zip");
VirtFs::removeZipFromSearchPath("../data/test/test.zip");
+ VirtFs::addDirToSearchPath("data/test", Append_true);
+ VirtFs::addDirToSearchPath("../data/test", Append_true);
REQUIRE(compareBuffers(buf) == true);
+ VirtFs::removeDirFromSearchPath("data/test");
+ VirtFs::removeDirFromSearchPath("../data/test");
}
#endif // USE_PHYSFS
@@ -439,7 +447,11 @@ TEST_CASE("integrity tests", "integrity")
SDL_RWclose(rw);
VirtFs::removeZipFromSearchPath("data/test/test.zip");
VirtFs::removeZipFromSearchPath("../data/test/test.zip");
+ VirtFs::addDirToSearchPath("data/test", Append_true);
+ VirtFs::addDirToSearchPath("../data/test", Append_true);
REQUIRE(compareBuffers(buf) == true);
+ VirtFs::removeDirFromSearchPath("data/test");
+ VirtFs::removeDirFromSearchPath("../data/test");
}
SECTION("integrity Loader::getImage test 8")
@@ -498,6 +510,8 @@ TEST_CASE("integrity tests", "integrity")
delete client;
client = nullptr;
+ VirtFs::removeDirFromSearchPath("data");
+ VirtFs::removeDirFromSearchPath("../data");
delete2(logger);
// VirtFs::deinit();
}