diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/files/tar/tar.tbz2 | bin | 0 -> 168 bytes | |||
-rw-r--r-- | tests/files/tar/tar.tgz | bin | 0 -> 166 bytes | |||
-rwxr-xr-x | tests/tar.test | 14 |
3 files changed, 14 insertions, 0 deletions
diff --git a/tests/files/tar/tar.tbz2 b/tests/files/tar/tar.tbz2 Binary files differnew file mode 100644 index 00000000..cb86319b --- /dev/null +++ b/tests/files/tar/tar.tbz2 diff --git a/tests/files/tar/tar.tgz b/tests/files/tar/tar.tgz Binary files differnew file mode 100644 index 00000000..f40c9c06 --- /dev/null +++ b/tests/files/tar/tar.tgz diff --git a/tests/tar.test b/tests/tar.test index 80ba5551..50a94e60 100755 --- a/tests/tar.test +++ b/tests/tar.test @@ -88,3 +88,17 @@ f="filename_with_50_chars_xxxxxxxxxxxxxxxxxxxxxxxxxxx" mkdir $d echo "This is testdata" > $d/$f testing "longname pathname" "tar -cf testFile.tar $d/$f && [ -e testFile.tar ] && echo 'yes'; rm -rf $d; tar -xf testFile.tar && [ -f $d/$f ] && cat $d/$f && strings testFile.tar | grep -o LongLink; rm -f testFile.tar; rm -rf $d" "yes\nThis is testdata\nLongLink\n" "" "" + +# gzip +rm -rf d +mkdir d +echo "hello world" > d/f +testing "gzip compression" "tar zcf f d && file f | grep -q gzip && echo y ; rm -rf d ; tar xf f && cat d/f" "y\nhello world\n" "" "" +testing "gzip decompression" "tar xf $FILES/tar/tar.tgz && cat dir/file" "hello world\n" "" "" + +# bzip2 +rm -rf d +mkdir d +echo "hello world" > d/f +testing "bzip2 compression" "tar jcf f d && file f | grep -q bzip2 && echo y ; rm -rf d ; tar xf f && cat d/f" "y\nhello world\n" "" "" +testing "bzip2 decompression" "tar xf $FILES/tar/tar.tbz2 && cat dir/file" "hello world\n" "" "" |