From b9fa85fc5eb2e9484e000381154972b9bfef71eb Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Sat, 22 Aug 2020 12:41:55 -0700 Subject: tar: add -I (--use-compress-program) support. This also changes the other compression options (such as -j) so that we pass no arguments for compression and just -d for decompression, which is what -I does to its filter and which appears sufficient. (I think I used -dc before just out of habit, since that's what I've been typing on the command line for decades.) --- tests/tar.test | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/tar.test b/tests/tar.test index d6c505ae..0a91bac8 100644 --- a/tests/tar.test +++ b/tests/tar.test @@ -161,6 +161,13 @@ testing "manually specify bz2" 'LST -jf "$FILES"/tar/tar.tbz2' \ "drwxr-x--- enh/eng 0 2017-05-13 01:05 dir/\n-rw-r----- enh/eng 12 2017-05-13 01:05 dir/file\n" \ "" "" +# -I +testing "-I gzip c" "$TAR -Igzip file | file -" \ + "/dev/stdin: gzip compressed data, from Unix\n" "" "" +testing "-I gzip t" 'LST -Igzip -f "$FILES"/tar/tar.tgz' \ + "drwxr-x--- enh/eng 0 2017-05-13 01:05 dir/\n-rw-r----- enh/eng 12 2017-05-13 01:05 dir/file\n" \ + "" "" + skipnot mknod dir/char c 12 34 2>/dev/null testing "character special" "tar --mtime @0 -cf test.tar dir/char && rm -f dir/char && tar xf test.tar && ls -l dir/char" \ "crw-rw---- 1 root root 12, 34 1970-01-01 00:00 dir/char\n" "" "" -- cgit v1.2.3