Clarify absolute path test extraction roots
This commit is contained in:
1 parent
83a023ee30
commit
abba713e8e
1 file changed
+6
-2
@@ -59,7 +59,10 @@ DEFINE_TEST(test_extract_tar_absolute_paths)
|
||||
UNLINK(temp_absolute_file_name);
|
||||
|
||||
// Extracting the archive without -P / --absolute-paths should strip leading drive letter or slash
|
||||
r = systemf("%s -xf test.tar 2>test.err", testprog);
|
||||
// inside its own extraction directory.
|
||||
assertMakeDir("without-P", 0755);
|
||||
assertChdir("without-P");
|
||||
r = systemf("%s -xf ../test.tar 2>test.err", testprog);
|
||||
assertEqualInt(r, 0);
|
||||
assertFileNotExists(temp_absolute_file_name);
|
||||
|
||||
@@ -70,8 +73,9 @@ DEFINE_TEST(test_extract_tar_absolute_paths)
|
||||
assertFileExists(temp_absolute_file_name + 1); // Skip the slash.
|
||||
#endif
|
||||
|
||||
// Extracting the archive with -P / --absolute-paths in a new directory should
|
||||
// Extracting the archive with -P / --absolute-paths in a separate directory should
|
||||
// create the file without creating a mangled path.
|
||||
assertChdir("..");
|
||||
assertMakeDir("with-P", 0755);
|
||||
assertChdir("with-P");
|
||||
r = systemf("%s --absolute-paths -xf ../test.tar", testprog);
|
||||
|
||||
Reference in new issue
Block a user