logic: add contained symlinked directories to indexed and excluded paths

This commit is contained in:
Eberhard Graether
2017-11-07 13:43:50 +01:00
parent 28fe1533b7
commit a2d412ccfa
8 changed files with 110 additions and 54 deletions
+17
View File
@@ -109,6 +109,18 @@ public:
#endif
}
void test_find_symlinked_directories()
{
#ifndef _WIN32
std::vector<FilePath> directoryPaths;
directoryPaths.push_back(FilePath("./data/FileSystemTestSuite/src"));
std::set<FilePath> dirs = FileSystem::getSymLinkedDirectories(directoryPaths);
TS_ASSERT_EQUALS(dirs.size(), 2);
#endif
}
void test_filesystem_finds_existing_files()
{
TS_ASSERT(FileSystem::exists(FilePath("data/FileSystemTestSuite")));
@@ -145,6 +157,11 @@ private:
return std::end(files) != std::find(std::begin(files), std::end(files), filename);
}
bool isInFiles(const std::set<FilePath>& files, const FilePath& filename)
{
return std::end(files) != files.find(filename);
}
bool isInFileInfos(const std::vector<FileInfo>& infos, const std::string filename)
{
for (const FileInfo& info : infos)