diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-16 23:18:59 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-16 23:18:59 +0100 |
commit | 8a936cfab718aee9f304f1b41e6b16cf6b5999f9 (patch) | |
tree | 5ae3e37a204a8d13e7e70b84a48ec415e464e98a /testsuite | |
parent | 425ad9c93b2736a0ebfbba6267bc1ad56c49d156 (diff) | |
download | busybox-w32-8a936cfab718aee9f304f1b41e6b16cf6b5999f9.tar.gz busybox-w32-8a936cfab718aee9f304f1b41e6b16cf6b5999f9.tar.bz2 busybox-w32-8a936cfab718aee9f304f1b41e6b16cf6b5999f9.zip |
tar: add support for --overwrite. +70 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/tar.tests | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tar.tests b/testsuite/tar.tests index 35f96b77e..6c136a615 100755 --- a/testsuite/tar.tests +++ b/testsuite/tar.tests | |||
@@ -31,6 +31,19 @@ Ok | |||
31 | " \ | 31 | " \ |
32 | "" "" | 32 | "" "" |
33 | 33 | ||
34 | testing "tar --overwrite" "\ | ||
35 | rm -rf input_* test.tar 2>/dev/null | ||
36 | ln input input_hard | ||
37 | tar cf test.tar input_hard | ||
38 | echo WRONG >input | ||
39 | # --overwrite opens 'input_hard' without unlinking, | ||
40 | # thus 'input_hard' still linked to 'input' and we write 'Ok' into it | ||
41 | tar xf test.tar --overwrite 2>&1 && cat input | ||
42 | " "\ | ||
43 | Ok | ||
44 | " \ | ||
45 | "Ok\n" "" | ||
46 | |||
34 | cd .. && rm -rf tempdir || exit 1 | 47 | cd .. && rm -rf tempdir || exit 1 |
35 | 48 | ||
36 | exit $FAILCOUNT | 49 | exit $FAILCOUNT |