From 29aff8d5ab46c8d0199aa4bfa7eeff5d4fa2d7ef Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Wed, 18 Jul 2018 21:07:11 -0400 Subject: Virtual Filesystem 2: Electric Boogaloo (#676) * Virtual Filesystem * Fix delete bug and documentate * Review fixes + other stuff * Fix puyo regression --- src/tests/core/file_sys/path_parser.cpp | 38 --------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 src/tests/core/file_sys/path_parser.cpp (limited to 'src/tests/core') diff --git a/src/tests/core/file_sys/path_parser.cpp b/src/tests/core/file_sys/path_parser.cpp deleted file mode 100644 index 2b543e438..000000000 --- a/src/tests/core/file_sys/path_parser.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2016 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include -#include "common/file_util.h" -#include "core/file_sys/path_parser.h" - -namespace FileSys { - -TEST_CASE("PathParser", "[core][file_sys]") { - REQUIRE(!PathParser(Path(std::vector{})).IsValid()); - REQUIRE(!PathParser(Path("a")).IsValid()); - REQUIRE(!PathParser(Path("/|")).IsValid()); - REQUIRE(PathParser(Path("/a")).IsValid()); - REQUIRE(!PathParser(Path("/a/b/../../c/../../d")).IsValid()); - REQUIRE(PathParser(Path("/a/b/../c/../../d")).IsValid()); - REQUIRE(PathParser(Path("/")).IsRootDirectory()); - REQUIRE(!PathParser(Path("/a")).IsRootDirectory()); - REQUIRE(PathParser(Path("/a/..")).IsRootDirectory()); -} - -TEST_CASE("PathParser - Host file system", "[core][file_sys]") { - std::string test_dir = "./test"; - FileUtil::CreateDir(test_dir); - FileUtil::CreateDir(test_dir + "/z"); - FileUtil::CreateEmptyFile(test_dir + "/a"); - - REQUIRE(PathParser(Path("/a")).GetHostStatus(test_dir) == PathParser::FileFound); - REQUIRE(PathParser(Path("/b")).GetHostStatus(test_dir) == PathParser::NotFound); - REQUIRE(PathParser(Path("/z")).GetHostStatus(test_dir) == PathParser::DirectoryFound); - REQUIRE(PathParser(Path("/a/c")).GetHostStatus(test_dir) == PathParser::FileInPath); - REQUIRE(PathParser(Path("/b/c")).GetHostStatus(test_dir) == PathParser::PathNotFound); - - FileUtil::DeleteDirRecursively(test_dir); -} - -} // namespace FileSys -- cgit v1.2.3