aboutsummaryrefslogtreecommitdiff
path: root/testsuite/tar.tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tar.tests')
-rwxr-xr-xtestsuite/tar.tests17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tar.tests b/testsuite/tar.tests
index 472064f7f..d41d10d57 100755
--- a/testsuite/tar.tests
+++ b/testsuite/tar.tests
@@ -168,6 +168,23 @@ Ok
168" \ 168" \
169"" "" 169"" ""
170 170
171# On extract, everything up to and including last ".." component is stripped
172testing "tar strips /../ on extract" "\
173rm -rf input_* test.tar 2>/dev/null
174mkdir input_dir
175echo Ok >input_dir/file
176tar cf test.tar ./../tar.tempdir/input_dir/../input_dir 2>&1
177rm -rf input_* 2>/dev/null
178tar -vxf test.tar 2>&1
179cat input_dir/file 2>&1
180" "\
181tar: removing leading './../tar.tempdir/input_dir/../'
182input_dir/
183input_dir/file
184Ok
185" \
186"" ""
187
171 188
172cd .. && rm -rf tar.tempdir || exit 1 189cd .. && rm -rf tar.tempdir || exit 1
173 190