Add CLI Program Name Detection for LZ4

This commit is contained in:
W. Felix Handte
2017-09-28 19:18:15 -04:00
parent 5705d9f25a
commit d0519d4b0c
2 changed files with 16 additions and 1 deletions
+12 -1
View File
@@ -375,16 +375,27 @@ test-pool: poolTests
$(QEMU_SYS) ./poolTests
test-lz4: ZSTD = LD_LIBRARY_PATH=/usr/local/lib $(PRGDIR)/zstd
test-lz4: ZSTD_LZ4 = LD_LIBRARY_PATH=/usr/local/lib ./lz4
test-lz4: ZSTD_UNLZ4 = LD_LIBRARY_PATH=/usr/local/lib ./unlz4
test-lz4: zstd decodecorpus
ln -s $(PRGDIR)/zstd lz4
ln -s $(PRGDIR)/zstd unlz4
./decodecorpus -ptmp
# lz4 -> zstd
lz4 < tmp | \
$(ZSTD) -d | \
cmp - tmp
lz4 < tmp | \
$(ZSTD_UNLZ4) | \
cmp - tmp
# zstd -> lz4
$(ZSTD) --format=lz4 < tmp | \
lz4 -d | \
cmp - tmp
$(ZSTD_LZ4) < tmp | \
lz4 -d | \
cmp - tmp
# zstd -> zstd
$(ZSTD) --format=lz4 < tmp | \
$(ZSTD) -d | \
@@ -394,6 +405,6 @@ test-lz4: zstd decodecorpus
$(ZSTD) -d | \
cmp - tmp
rm tmp
rm tmp lz4 unlz4
endif