diff options
Diffstat (limited to 'src/fs/virtfsdir_unittest.cc')
-rw-r--r-- | src/fs/virtfsdir_unittest.cc | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/fs/virtfsdir_unittest.cc b/src/fs/virtfsdir_unittest.cc index a005341de..1f162a6e9 100644 --- a/src/fs/virtfsdir_unittest.cc +++ b/src/fs/virtfsdir_unittest.cc @@ -32,15 +32,22 @@ TEST_CASE("VirtFsDir getEntries") { - VirtFsDir::init(); + VirtFsDir::init("."); REQUIRE(VirtFsDir::getEntries().empty()); REQUIRE(VirtFsDir::searchEntryByRoot("test") == nullptr); VirtFsDir::deinit(); } +TEST_CASE("VirtFsDir getBaseDir") +{ + VirtFsDir::init("."); + REQUIRE(VirtFsDir::getBaseDir() != nullptr); + VirtFsDir::deinit(); +} + TEST_CASE("VirtFsDir addToSearchPath") { - VirtFsDir::init(); + VirtFsDir::init("."); logger = new Logger(); SECTION("simple 1") { @@ -156,7 +163,7 @@ TEST_CASE("VirtFsDir addToSearchPath") TEST_CASE("VirtFsDir removeFromSearchPath") { - VirtFsDir::init(); + VirtFsDir::init("."); logger = new Logger(); SECTION("simple 1") @@ -230,7 +237,7 @@ TEST_CASE("VirtFsDir removeFromSearchPath") TEST_CASE("VirtFsDir exists") { - VirtFsDir::init(); + VirtFsDir::init("."); logger = new Logger(); VirtFsDir::addToSearchPathSilent("data", Append_false, @@ -298,7 +305,7 @@ static void removeTemp(StringVect &restrict list) TEST_CASE("VirtFsDir getRealDir") { - VirtFsDir::init(); + VirtFsDir::init("."); logger = new Logger(); REQUIRE(VirtFsDir::getRealDir(".") == ""); REQUIRE(VirtFsDir::getRealDir("..") == ""); @@ -382,7 +389,7 @@ static bool inList(VirtList *list, TEST_CASE("VirtFsDir enumerateFiles1") { - VirtFsDir::init(); + VirtFsDir::init("."); logger = new Logger; VirtFsDir::addToSearchPathSilent("data", @@ -424,7 +431,7 @@ TEST_CASE("VirtFsDir enumerateFiles1") TEST_CASE("VirtFsDir enumerateFiles2") { - VirtFsDir::init(); + VirtFsDir::init("."); logger = new Logger; VirtFsDir::addToSearchPathSilent("data/test/dir1", @@ -448,7 +455,7 @@ TEST_CASE("VirtFsDir enumerateFiles2") TEST_CASE("VirtFsDir enumerateFiles3") { - VirtFsDir::init(); + VirtFsDir::init("."); logger = new Logger; VirtFsDir::addToSearchPathSilent("data/test/dir1", @@ -478,7 +485,7 @@ TEST_CASE("VirtFsDir enumerateFiles3") TEST_CASE("VirtFsDir isDirectory") { - VirtFsDir::init(); + VirtFsDir::init("."); logger = new Logger(); VirtFsDir::addToSearchPathSilent("data", Append_false, @@ -546,7 +553,7 @@ TEST_CASE("VirtFsDir isDirectory") TEST_CASE("VirtFsDir openRead") { - VirtFsDir::init(); + VirtFsDir::init("."); logger = new Logger(); VirtFsDir::addToSearchPathSilent("data", Append_false, @@ -613,7 +620,7 @@ TEST_CASE("VirtFsDir openRead") TEST_CASE("VirtFsDir permitLinks") { - VirtFsDir::init(); + VirtFsDir::init("."); logger = new Logger(); VirtFsDir::addToSearchPathSilent("data", Append_false, @@ -652,7 +659,7 @@ TEST_CASE("VirtFsDir permitLinks") TEST_CASE("VirtFsDir read") { - VirtFsDir::init(); + VirtFsDir::init("."); logger = new Logger(); VirtFsDir::addToSearchPathSilent("data", Append_false, |