| 1236 | } |
| 1237 | |
| 1238 | void GenericFileSystemTest::TestSpecialChars(FileSystem* fs) { |
| 1239 | ASSERT_OK(fs->CreateDir("Blank Char")); |
| 1240 | CreateFile(fs, "Blank Char/Special%Char.txt", "data"); |
| 1241 | std::vector<std::string> all_dirs{"Blank Char"}; |
| 1242 | |
| 1243 | AssertAllDirs(fs, all_dirs); |
| 1244 | AssertAllFiles(fs, {"Blank Char/Special%Char.txt"}); |
| 1245 | AssertFileContents(fs, "Blank Char/Special%Char.txt", "data"); |
| 1246 | |
| 1247 | ASSERT_OK(fs->CopyFile("Blank Char/Special%Char.txt", "Special and%different.txt")); |
| 1248 | AssertAllDirs(fs, all_dirs); |
| 1249 | AssertAllFiles(fs, {"Blank Char/Special%Char.txt", "Special and%different.txt"}); |
| 1250 | AssertFileContents(fs, "Special and%different.txt", "data"); |
| 1251 | |
| 1252 | ASSERT_OK(fs->DeleteFile("Special and%different.txt")); |
| 1253 | if (have_flaky_directory_tree_deletion()) { |
| 1254 | ASSERT_OK(fs->DeleteFile("Blank Char/Special%Char.txt")); |
| 1255 | } else { |
| 1256 | ASSERT_OK(fs->DeleteDir("Blank Char")); |
| 1257 | AssertAllDirs(fs, {}); |
| 1258 | } |
| 1259 | AssertAllFiles(fs, {}); |
| 1260 | } |
| 1261 | |
| 1262 | #define GENERIC_FS_TEST_DEFINE(FUNC_NAME) \ |
| 1263 | void GenericFileSystemTest::FUNC_NAME() { FUNC_NAME(GetEmptyFileSystem().get()); } |
nothing calls this directly
no test coverage detected