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/virtfsdir_unittest.cc | |
parent | 4998ec60e1f065a91fd45de2aea20c4d5a002a43 (diff) | |
download | plus-32061bfe63fce77accf1657a6631700c859fa541.tar.gz plus-32061bfe63fce77accf1657a6631700c859fa541.tar.bz2 plus-32061bfe63fce77accf1657a6631700c859fa541.tar.xz plus-32061bfe63fce77accf1657a6631700c859fa541.zip |
Fix some issues in virtfs and update tests.
Diffstat (limited to 'src/fs/virtfs/virtfsdir_unittest.cc')
-rw-r--r-- | src/fs/virtfs/virtfsdir_unittest.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/fs/virtfs/virtfsdir_unittest.cc b/src/fs/virtfs/virtfsdir_unittest.cc index ad55acf2e..0a39dbdb4 100644 --- a/src/fs/virtfs/virtfsdir_unittest.cc +++ b/src/fs/virtfs/virtfsdir_unittest.cc @@ -247,6 +247,9 @@ TEST_CASE("VirtFsDir exists") Append_false, SkipError_false); + REQUIRE(VirtFsDir::exists("test") == true); + REQUIRE(VirtFsDir::exists("test/dir1")); + REQUIRE(VirtFsDir::exists("test/dir") == false); REQUIRE(VirtFsDir::exists("test//units.xml") == true); REQUIRE(VirtFsDir::exists("test/\\units123.xml") == false); REQUIRE(VirtFsDir::exists("tesQ/units.xml") == false); @@ -259,6 +262,9 @@ TEST_CASE("VirtFsDir exists") Append_false, SkipError_false); + REQUIRE(VirtFsDir::exists("test") == true); + REQUIRE(VirtFsDir::exists("test/dir1")); + REQUIRE(VirtFsDir::exists("test/dir") == false); REQUIRE(VirtFsDir::exists("test\\units.xml") == true); REQUIRE(VirtFsDir::exists("test/units123.xml") == false); REQUIRE(VirtFsDir::exists("tesQ/units.xml") == false); @@ -267,6 +273,9 @@ TEST_CASE("VirtFsDir exists") VirtFsDir::removeFromSearchPathSilent("data/test"); VirtFsDir::removeFromSearchPathSilent("../data/test"); + REQUIRE(VirtFsDir::exists("test") == true); + REQUIRE(VirtFsDir::exists("test/dir1")); + REQUIRE(VirtFsDir::exists("test/dir") == false); REQUIRE(VirtFsDir::exists("test\\units.xml") == true); REQUIRE(VirtFsDir::exists("test/units123.xml") == false); REQUIRE(VirtFsDir::exists("tesQ/units.xml") == false); @@ -430,6 +439,11 @@ TEST_CASE("VirtFsDir enumerateFiles1") REQUIRE(list->names.size() == cnt2); VirtFsDir::freeList(list); + VirtFsDir::permitLinks(true); + list = VirtFsDir::enumerateFiles("test/units.xml"); + REQUIRE(list->names.size() == 0); + VirtFsDir::freeList(list); + VirtFsDir::permitLinks(false); list = VirtFsDir::enumerateFiles("test\\"); removeTemp(list->names); |