aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2021-02-28 03:37:21 -0600
committerRob Landley <rob@landley.net>2021-02-28 03:37:21 -0600
commit50f604f415d77b3679df1f8d9d3856f9840998be (patch)
treebd4e5d5032d28fac5be99f7cc92b2936977f4bbc /tests
parent1ba53eead1ab9787e77dc43196b8402ec96e7fd4 (diff)
downloadtoybox-50f604f415d77b3679df1f8d9d3856f9840998be.tar.gz
Tar should remove empty directories where it wants to put a non-directory.
Diffstat (limited to 'tests')
-rw-r--r--tests/tar.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/tar.test b/tests/tar.test
index dbe28d78..4b2f2120 100644
--- a/tests/tar.test
+++ b/tests/tar.test
@@ -274,6 +274,12 @@ testcmd 'exclude' '--exclude skip -cvf tar.tar folder && echo yes' \
'folder/\nyes\n' '' ''
rm -rf folder tar.tar
+mkdir -p one/two; echo hello > one/two/three; tar czf test.tar one/two/three
+rm one/two/three; mkdir one/two/three
+testcmd 'replace dir with file' '-xf test.tar && cat one/two/three' \
+ 'hello\n' '' ''
+rm -rf one test.tar
+
if false
then