diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-03-02 00:27:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-02 00:27:17 +0300 |
commit | 32061bfe63fce77accf1657a6631700c859fa541 (patch) | |
tree | 62ad40c3b71ab01295651fbfdfdd9547060bcc9f /src/fs/virtfs/virtfszip_unittest.cc | |
parent | 4998ec60e1f065a91fd45de2aea20c4d5a002a43 (diff) | |
download | manaverse-32061bfe63fce77accf1657a6631700c859fa541.tar.gz manaverse-32061bfe63fce77accf1657a6631700c859fa541.tar.bz2 manaverse-32061bfe63fce77accf1657a6631700c859fa541.tar.xz manaverse-32061bfe63fce77accf1657a6631700c859fa541.zip |
Fix some issues in virtfs and update tests.
Diffstat (limited to 'src/fs/virtfs/virtfszip_unittest.cc')
-rw-r--r-- | src/fs/virtfs/virtfszip_unittest.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fs/virtfs/virtfszip_unittest.cc b/src/fs/virtfs/virtfszip_unittest.cc index 7ac442c78..0cde2c80f 100644 --- a/src/fs/virtfs/virtfszip_unittest.cc +++ b/src/fs/virtfs/virtfszip_unittest.cc @@ -256,6 +256,7 @@ TEST_CASE("VirtFsZip exists") REQUIRE(VirtFsZip::exists("units1.xml") == false); REQUIRE(VirtFsZip::exists("dir/hide.png") == true); REQUIRE(VirtFsZip::exists("dir/brimmedhat.png") == false); + REQUIRE(VirtFsZip::exists("dir\\1")); VirtFsZip::addToSearchPathSilent("data/test/test.zip", Append_false); @@ -268,6 +269,7 @@ TEST_CASE("VirtFsZip exists") REQUIRE(VirtFsZip::exists("units1.xml") == false); REQUIRE(VirtFsZip::exists("dir/hide.png") == true); REQUIRE(VirtFsZip::exists("dir/brimmedhat.png") == true); + REQUIRE(VirtFsZip::exists("dir\\1")); VirtFsZip::removeFromSearchPathSilent("data/test/test2.zip"); VirtFsZip::removeFromSearchPathSilent("../data/test/test2.zip"); @@ -278,6 +280,7 @@ TEST_CASE("VirtFsZip exists") REQUIRE(VirtFsZip::exists("units1.xml") == false); REQUIRE(VirtFsZip::exists("dir/\\/hide.png") == true); REQUIRE(VirtFsZip::exists("dir/brimmedhat.png") == true); + REQUIRE(VirtFsZip::exists("dir\\1") == false); REQUIRE_THROWS(VirtFsZip::exists("test/../units.xml")); @@ -299,6 +302,7 @@ TEST_CASE("VirtFsZip getRealDir") REQUIRE(VirtFsZip::getRealDir(".") == ""); REQUIRE(VirtFsZip::getRealDir("..") == ""); REQUIRE(VirtFsZip::getRealDir("test.txt") == prefix + "test2.zip"); + REQUIRE(VirtFsZip::getRealDir("dir/1") == prefix + "test2.zip"); REQUIRE(VirtFsZip::getRealDir("dir\\dye.png") == prefix + "test2.zip"); REQUIRE(VirtFsZip::getRealDir("zzz") == ""); |