libunarchive: move dpkg-specific things into dpkg.c. 0 byte size differences
[oweals/busybox.git] / testsuite / tar.tests
1 #!/bin/sh
2 # Copyright 2009 by Denys Vlasenko
3 # Licensed under GPL v2, see file LICENSE for details.
4
5 . ./testing.sh
6
7 mkdir tempdir && cd tempdir || exit 1
8
9 # testing "test name" "script" "expected result" "file input" "stdin"
10
11 testing "tar hardlinks and repeated files" "\
12 rm -rf input_* test.tar 2>/dev/null
13 >input_hard1
14 ln input_hard1 input_hard2
15 mkdir input_dir
16 >input_dir/file
17 tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input
18 tar tvf test.tar | sed 's/.*[0-9] input/input/'
19 tar xf test.tar 2>&1 && echo Ok
20 " "\
21 input
22 input_dir/
23 input_dir/file
24 input_hard1
25 input_hard2 -> input_hard1
26 input_hard1 -> input_hard1
27 input_dir/
28 input_dir/file
29 input
30 Ok
31 " \
32 "" ""
33
34 cd .. && rm -rf tempdir || exit 1
35
36 exit $FAILCOUNT