summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2016-12-07 22:49:04 (GMT)
committerYann Collet <cyan@fb.com>2016-12-07 22:49:04 (GMT)
commit750a50cf67e8574500e4f9b4bb5e7f6cdd6f9c26 (patch)
treee9273eb9b66b48dcbf43e7d3149cd50f3efa9e66 /tests
parent01ffed25adbb4d18e48ceac59b1e5174ae29fc7f (diff)
downloadlz4-750a50cf67e8574500e4f9b4bb5e7f6cdd6f9c26.zip
lz4-750a50cf67e8574500e4f9b4bb5e7f6cdd6f9c26.tar.gz
lz4-750a50cf67e8574500e4f9b4bb5e7f6cdd6f9c26.tar.bz2
fix #284, reported by @beiDei8z : added test cases for path/to/lz4cat
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 5923a20..adfcfea 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -207,9 +207,12 @@ test-lz4-multiple: lz4 datagen
@$(RM) tmp*
unlz4:
- @$(MAKE) -C $(PRGDIR) unlz4
+ @$(MAKE) -C $(PRGDIR) $@
-test-lz4-basic: lz4 datagen unlz4
+lz4cat:
+ @$(MAKE) -C $(PRGDIR) $@
+
+test-lz4-basic: lz4 datagen unlz4 lz4cat
@echo "\n ---- test lz4 basic compression/decompression ----"
./datagen -g0 | $(LZ4) -v | $(LZ4) -t
./datagen -g16KB | $(LZ4) -9 | $(LZ4) -t
@@ -224,13 +227,18 @@ test-lz4-basic: lz4 datagen unlz4
./datagen -g33M | $(LZ4) --no-frame-crc | $(LZ4) -t
./datagen -g256MB | $(LZ4) -vqB4D | $(LZ4) -t
@echo "hello world" > tmp
- $(LZ4) --rm tmp
+ $(LZ4) --rm -f tmp
ls -ls tmp && false || true # must fail (--rm)
ls -ls tmp.lz4
+ $(PRGDIR)/lz4cat tmp.lz4 # must display hello world
+ ls -ls tmp.lz4
$(PRGDIR)/unlz4 --rm tmp.lz4
ls -ls tmp
ls -ls tmp.lz4 && false || true # must fail (--rm)
ls -ls tmp.lz4.lz4 && false || true # must fail (unlz4)
+ $(PRGDIR)/lz4cat tmp # pass-through mode
+ ls -ls tmp
+ ls -ls tmp.lz4 && false || true # must fail (lz4cat)
@$(RM) tmp*
test-lz4-hugefile: lz4 datagen