aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-10-22 01:07:13 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-10-22 01:07:13 +0200
commit6c563e370d0f2f3cf36f3b274e8fe1392ca7125f (patch)
tree8e9a7cd2e979bc6c956b863128086a342dd1a676 /testsuite
parentc47917865d5f40f9044dd8845814c591d801318d (diff)
downloadbusybox-w32-6c563e370d0f2f3cf36f3b274e8fe1392ca7125f.tar.gz
busybox-w32-6c563e370d0f2f3cf36f3b274e8fe1392ca7125f.tar.bz2
busybox-w32-6c563e370d0f2f3cf36f3b274e8fe1392ca7125f.zip
tar: add support for --strip-components=N
function old new delta data_extract_all 882 995 +113 tar_longopts 290 309 +19 tar_main 938 942 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 136/0) Total: 136 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/tar.tests10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tar.tests b/testsuite/tar.tests
index 4929f4e49..383a4646c 100755
--- a/testsuite/tar.tests
+++ b/testsuite/tar.tests
@@ -53,6 +53,15 @@ dd if=/dev/zero bs=512 count=20 2>/dev/null | tar xvf - 2>&1; echo $?
53"" "" 53"" ""
54SKIP= 54SKIP=
55 55
56# "tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input":
57# GNU tar 1.26 records as hardlinks:
58# input_hard2 -> input_hard1
59# input_hard1 -> input_hard1 (!!!)
60# input_dir/file -> input_dir/file
61# input -> input
62# As of 1.24.0, we don't record last two: for them, nlink==1
63# and we check for "hardlink"ness only files with nlink!=1
64# We also don't use "hrw-r--r--" notation for hardlinks in "tar tv" listing.
56optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES 65optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
57testing "tar hardlinks and repeated files" '\ 66testing "tar hardlinks and repeated files" '\
58rm -rf input_* test.tar 2>/dev/null 67rm -rf input_* test.tar 2>/dev/null
@@ -64,6 +73,7 @@ chmod -R 644 *
64chmod 755 input_dir 73chmod 755 input_dir
65tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input 74tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input
66tar tvf test.tar | sed "s/.*[0-9] input/input/" 75tar tvf test.tar | sed "s/.*[0-9] input/input/"
76rm -rf input_dir
67tar xf test.tar 2>&1 77tar xf test.tar 2>&1
68echo Ok: $? 78echo Ok: $?
69ls -l . input_dir/* | grep input_ | sed "s/\\(^[^ ]*\\) .* input/\\1 input/" 79ls -l . input_dir/* | grep input_ | sed "s/\\(^[^ ]*\\) .* input/\\1 input/"