MCPcopy Create free account
hub / github.com/apache/arrow / TestSpecialChars

Method TestSpecialChars

cpp/src/arrow/filesystem/test_util.cc:1238–1260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1236}
1237
1238void 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()); }

Callers

nothing calls this directly

Calls 9

CreateFileFunction · 0.85
AssertAllDirsFunction · 0.85
AssertAllFilesFunction · 0.85
AssertFileContentsFunction · 0.70
CreateDirMethod · 0.45
CopyFileMethod · 0.45
DeleteFileMethod · 0.45
DeleteDirMethod · 0.45

Tested by

no test coverage detected