diff options
author | Yann Collet <cyan@fb.com> | 2022-07-01 04:53:29 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2022-07-01 04:53:29 (GMT) |
commit | 24b50935f9d56bb82214961dbcbd83f8c296b44b (patch) | |
tree | e596390589d2cf3c284baae0bac7c5d34164ed35 /tests/Makefile | |
parent | b2f61471941372a1aee49fefee1811a150757892 (diff) | |
download | lz4-24b50935f9d56bb82214961dbcbd83f8c296b44b.zip lz4-24b50935f9d56bb82214961dbcbd83f8c296b44b.tar.gz lz4-24b50935f9d56bb82214961dbcbd83f8c296b44b.tar.bz2 |
fail on requesting to process 3+ file names in legacy mode
warning only if -f is selected.
Diffstat (limited to 'tests/Makefile')
-rw-r--r-- | tests/Makefile | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/Makefile b/tests/Makefile index 9f83f06..059fcda 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -154,6 +154,7 @@ endif # note : we should probably settle on a single compare utility CMP:=cmp +GREP:=grep DIFF:=diff ifneq (,$(filter $(shell $(UNAME)),SunOS)) DIFF:=gdiff @@ -347,8 +348,7 @@ test-lz4-basic: lz4 datagen unlz4 lz4cat $(LZ4) --rm -f tmp-tlb-hw tmp-tlb-hw.lz4 test ! -f tmp-tlb-hw # must fail (--rm) test -f tmp-tlb-hw.lz4 - $(PRGDIR)/lz4cat tmp-tlb-hw.lz4 # must display hello world - test -f tmp-tlb-hw.lz4 + $(PRGDIR)/lz4cat tmp-tlb-hw.lz4 | $(GREP) "hello world" $(PRGDIR)/unlz4 --rm tmp-tlb-hw.lz4 tmp-tlb-hw test -f tmp-tlb-hw test ! -f tmp-tlb-hw.lz4 # must fail (--rm) @@ -369,7 +369,8 @@ test-lz4-basic: lz4 datagen unlz4 lz4cat $(LZ4) -d --rm -- -z tmp-tlb4 # uncompresses ./-z into tmp-tlb4 test ! -f ./-z $(DIFF) -q tmp-tlb-hw tmp-tlb4 - $(LZ4) -f tmp-tlb-hw + ! $(LZ4) tmp-tlb2 tmp-tlb3 tmp-tlb4 # must fail: refuse to handle 3+ file names + $(LZ4) -f tmp-tlb-hw # create tmp-tlb-hw.lz4, for next tests $(LZ4) --list tmp-tlb-hw.lz4 # test --list on valid single-frame file $(LZ4) --list < tmp-tlb-hw.lz4 # test --list from stdin (file only) $(CAT) tmp-tlb-hw >> tmp-tlb-hw.lz4 @@ -392,7 +393,6 @@ test-lz4-basic: lz4 datagen unlz4 lz4cat @$(RM) tmp-tlb* - test-lz4-dict: lz4 datagen @echo "\n ---- test lz4 compression/decompression with dictionary ----" $(DATAGEN) -g16KB > tmp-dict @@ -415,7 +415,6 @@ test-lz4-dict: lz4 datagen < tmp-dict-$$l $(LZ4) -D stdin tmp-dict-data-128KB -c | $(LZ4) -dD tmp-dict-$$l-tail | $(DIFF) - tmp-dict-data-128KB; \ < tmp-dict-$$l-tail $(LZ4) -D stdin tmp-dict-data-128KB -c | $(LZ4) -dD tmp-dict-$$l | $(DIFF) - tmp-dict-data-128KB; \ done - @$(RM) tmp-dict* test-lz4-hugefile: lz4 datagen |