summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2022-09-14 18:04:24 (GMT)
committerYann Collet <cyan@fb.com>2022-09-14 18:13:07 (GMT)
commit3c1d5812afcded65ab085302a647fef7d1933ea4 (patch)
tree20e9d21e74aacdaeb1116ebe55deb1d7db28c280
parentfdfbe3a20a766c9bf3133fddce5326251b1e61d3 (diff)
downloadlz4-3c1d5812afcded65ab085302a647fef7d1933ea4.zip
lz4-3c1d5812afcded65ab085302a647fef7d1933ea4.tar.gz
lz4-3c1d5812afcded65ab085302a647fef7d1933ea4.tar.bz2
add a test to catch issue #1164
where `--test -m files*.lz4` would create a bunch of `files*` files. `--test` should not create any file. It turns out the bug was already fixed when #1164 was filled, but it also shows that the CI system was blind to such issues when it happened. The new test was run with `v1.9.3` and triggered an error, as expected.
-rw-r--r--tests/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 93a5581..62e364a 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -312,8 +312,14 @@ test-lz4-multiple: lz4 datagen
# compress multiple files, one of which is absent (must fail)
! $(LZ4) -f -m $(FPREFIX)-concat1 notHere $(FPREFIX)-concat2 # must fail : notHere not present
# test lz4-compressed file
+ $(RM) $(FPREFIX)-concat1 $(FPREFIX)-concat2
$(LZ4) -tm $(FPREFIX)-concat1.lz4
+ # ensure the test doesn't create artifact
+ test ! -f $(FPREFIX)-concat1 # must not create file artefact
+ # test multiple lz4-compressed file
$(LZ4) -tm $(FPREFIX)-concat1.lz4 $(FPREFIX)-concat2.lz4
+ test ! -f $(FPREFIX)-concat1 # must not create file artefact
+ test ! -f $(FPREFIX)-concat2 # must not create file artefact
# test multiple lz4 files, one of which is absent (must fail)
! $(LZ4) -tm $(FPREFIX)-concat1.lz4 notHere.lz4 $(FPREFIX)-concat2.lz4
@$(RM) $(FPREFIX)*