summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2020-08-25 21:42:15 (GMT)
committerYann Collet <cyan@fb.com>2020-08-25 21:42:15 (GMT)
commit224735ea1b7b224e14caf2e39b21854c439a7179 (patch)
tree1c74b1db085d4edb12e7c809c9a8217310f67bb5 /tests
parent65f081ccaffce6753ec02c53c7b6413deddf2eb9 (diff)
downloadlz4-224735ea1b7b224e14caf2e39b21854c439a7179.zip
lz4-224735ea1b7b224e14caf2e39b21854c439a7179.tar.gz
lz4-224735ea1b7b224e14caf2e39b21854c439a7179.tar.bz2
added more tests around --content-size
notably in association with `stdin`
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 6f29020..2fe9e69 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -212,7 +212,16 @@ test-lz4-contentSize: lz4 datagen
$(DATAGEN) -g15M > tmplc1
$(LZ4) -v tmplc1 -c | $(LZ4) -t
$(LZ4) -v --content-size tmplc1 -c | $(LZ4) -d > tmplc2
- $(DIFF) -s tmplc1 tmplc2
+ $(DIFF) tmplc1 tmplc2
+ $(LZ4) -f tmplc1
+ $(LZ4) --content-size tmplc1 -c > tmplc2.lz4
+ ! $(DIFF) tmplc1.lz4 tmplc2.lz4 # must differ, due to content size
+ $(LZ4) --content-size < tmplc1 > tmplc3.lz4
+ $(DIFF) tmplc2.lz4 tmplc3.lz4 # both must contain content size
+ $(CAT) tmplc1 | $(LZ4) > tmplc4.lz4
+ $(DIFF) tmplc1.lz4 tmplc4.lz4 # both don't have content size
+ $(CAT) tmplc1 | $(LZ4) --content-size > tmplc5.lz4 # can't determine content size
+ $(DIFF) tmplc1.lz4 tmplc5.lz4 # both don't have content size
@$(RM) tmplc*
test-lz4-frame-concatenation: lz4 datagen