]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
[zstdcli] Fix -t in streaming mode 770/head
authorNick Terrell <terrelln@fb.com>
Tue, 18 Jul 2017 21:45:49 +0000 (14:45 -0700)
committerNick Terrell <terrelln@fb.com>
Tue, 18 Jul 2017 21:45:49 +0000 (14:45 -0700)
programs/zstdcli.c
tests/playTests.sh

index 35772e0a7140a58c394627974afe4137a0e2649e..b1268c1f3a6698dc45f31a9c1539c09b2f0627a1 100644 (file)
@@ -719,6 +719,10 @@ int main(int argCount, const char* argv[])
         goto _end;
     }
 
+#ifndef ZSTD_NODECOMPRESS
+    if (operation==zom_test) { outFileName=nulmark; FIO_setRemoveSrcFile(0); } /* test mode */
+#endif
+
     /* No input filename ==> use stdin and stdout */
     filenameIdx += !filenameIdx;   /* filenameTable[0] is stdin by default */
     if (!strcmp(filenameTable[0], stdinmark) && !outFileName) outFileName = stdoutmark;   /* when input is stdin, default output is stdout */
@@ -763,7 +767,6 @@ int main(int argCount, const char* argv[])
 #endif
     } else {  /* decompression or test */
 #ifndef ZSTD_NODECOMPRESS
-        if (operation==zom_test) { outFileName=nulmark; FIO_setRemoveSrcFile(0); } /* test mode */
         FIO_setMemLimit(memLimit);
         if (filenameIdx==1 && outFileName)
             operationResult = FIO_decompressFilename(outFileName, filenameTable[0], dictFileName);
index dd0f2dbfea5329c16e6d8b7fae3891bf744d5eb4..77853b1a4c01122d479f53aeb5bf2e2c383eb1a3 100755 (executable)
@@ -383,6 +383,7 @@ $ZSTD -t --rm tmp1.zst
 test -f tmp1.zst   # check file is still present
 split -b16384 tmp1.zst tmpSplit.
 $ZSTD -t tmpSplit.* && die "bad file not detected !"
+./datagen | $ZSTD -c | $ZSTD -t
 
 
 $ECHO "\n**** benchmark mode tests **** "