add zcat symlink support, suggested by @wtarreau

added some test
also updated relevant doc

+ fixed a mistake in `lz4` symlink support :
  lz4 utility doesn't remove source files by default (like zstd, but unlike gzip).
  The symlink must behave the same.
This commit is contained in:
Yann Collet
2018-01-19 11:26:35 -08:00
parent d19dc1903c
commit cb5eba8e20
5 changed files with 86 additions and 59 deletions
+3
View File
@@ -24,6 +24,8 @@ pool
poolTests
invalidDictionaries
checkTag
zcat
zstdcat
# Tmp test directory
zstdtest
@@ -53,6 +55,7 @@ tmp*
*.gz
result
out
*.zstd
# fuzzer
afl
+11 -1
View File
@@ -239,8 +239,18 @@ $ZSTD -c hello.tmp > hello.zstd --no-check
$ZSTD -c world.tmp > world.zstd --no-check
cat hello.zstd world.zstd > helloworld.zstd
$ZSTD -dc helloworld.zstd > result.tmp
cat result.tmp
$DIFF helloworld.tmp result.tmp
$ECHO "testing zstdcat symlink"
ln -sf $ZSTD zstdcat
./zstdcat helloworld.zstd > result.tmp
$DIFF helloworld.tmp result.tmp
rm zstdcat
rm result.tmp
$ECHO "testing zcat symlink"
ln -sf $ZSTD zcat
./zcat helloworld.zstd > result.tmp
$DIFF helloworld.tmp result.tmp
rm zcat
rm ./*.tmp ./*.zstd
$ECHO "frame concatenation tests completed"