summaryrefslogtreecommitdiff
path: root/src/utils/files_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-11 19:08:11 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-11 19:19:38 +0300
commit245fb04a1e112cc8d0918a8660474299d5ce223c (patch)
treeeb5ab6266a4ff9551d2e08b9c14b61e353cd127f /src/utils/files_unittest.cc
parentf978c1bed85961e102951340669ca873328bcef3 (diff)
downloadmv-245fb04a1e112cc8d0918a8660474299d5ce223c.tar.gz
mv-245fb04a1e112cc8d0918a8660474299d5ce223c.tar.bz2
mv-245fb04a1e112cc8d0918a8660474299d5ce223c.tar.xz
mv-245fb04a1e112cc8d0918a8660474299d5ce223c.zip
Split virtfs api for add directories and archives.
Also remove useless resourcemanager functions for add/remove virtfs entries.
Diffstat (limited to 'src/utils/files_unittest.cc')
-rw-r--r--src/utils/files_unittest.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/utils/files_unittest.cc b/src/utils/files_unittest.cc
index 01996bd74..71e6e89c7 100644
--- a/src/utils/files_unittest.cc
+++ b/src/utils/files_unittest.cc
@@ -34,8 +34,8 @@ TEST_CASE("Files renameFile")
dirSeparator = "/";
logger = new Logger();
ResourceManager::init();
- resourceManager->addToSearchPath("data", Append_false);
- resourceManager->addToSearchPath("../data", Append_false);
+ VirtFs::addDirToSearchPath("data", Append_false);
+ VirtFs::addDirToSearchPath("../data", Append_false);
const int sz = 1234567;
char *buf = new char[sz];
@@ -71,8 +71,8 @@ TEST_CASE("Files existsLocal")
dirSeparator = "/";
logger = new Logger();
ResourceManager::init();
- resourceManager->addToSearchPath("data", Append_false);
- resourceManager->addToSearchPath("../data", Append_false);
+ VirtFs::addDirToSearchPath("data", Append_false);
+ VirtFs::addDirToSearchPath("../data", Append_false);
REQUIRE(Files::existsLocal(Files::getPath("help/about.txt")) == true);
REQUIRE_FALSE(Files::existsLocal(Files::getPath("help/about1.txt")));
REQUIRE_FALSE(Files::existsLocal(Files::getPath("help1/about.txt")));
@@ -85,8 +85,8 @@ TEST_CASE("Files loadTextFileString")
dirSeparator = "/";
logger = new Logger();
ResourceManager::init();
- resourceManager->addToSearchPath("data", Append_false);
- resourceManager->addToSearchPath("../data", Append_false);
+ VirtFs::addDirToSearchPath("data", Append_false);
+ VirtFs::addDirToSearchPath("../data", Append_false);
REQUIRE(Files::loadTextFileString("test/simplefile.txt") ==
"this is test \nfile.");
ResourceManager::deleteInstance();
@@ -98,8 +98,8 @@ TEST_CASE("Files loadTextFile")
dirSeparator = "/";
logger = new Logger();
ResourceManager::init();
- resourceManager->addToSearchPath("data", Append_false);
- resourceManager->addToSearchPath("../data", Append_false);
+ VirtFs::addDirToSearchPath("data", Append_false);
+ VirtFs::addDirToSearchPath("../data", Append_false);
StringVect lines;
Files::loadTextFile("test/simplefile.txt", lines);
@@ -115,8 +115,8 @@ TEST_CASE("Files saveTextFile")
dirSeparator = "/";
logger = new Logger();
ResourceManager::init();
- resourceManager->addToSearchPath("data", Append_false);
- resourceManager->addToSearchPath("../data", Append_false);
+ VirtFs::addDirToSearchPath("data", Append_false);
+ VirtFs::addDirToSearchPath("../data", Append_false);
const std::string dir = Files::getPath("test");
REQUIRE(dir.size() > 0);
@@ -133,8 +133,8 @@ TEST_CASE("Files getFilesInDir")
dirSeparator = "/";
logger = new Logger();
ResourceManager::init();
- resourceManager->addToSearchPath("data", Append_false);
- resourceManager->addToSearchPath("../data", Append_false);
+ VirtFs::addDirToSearchPath("data", Append_false);
+ VirtFs::addDirToSearchPath("../data", Append_false);
StringVect list;
Files::getFilesInDir("test",