mirror of
https://github.com/facebook/zstd.git
synced 2025-08-07 06:23:00 +03:00
[zstdcli] Fix -t in streaming mode
This commit is contained in:
@@ -719,6 +719,10 @@ int main(int argCount, const char* argv[])
|
|||||||
goto _end;
|
goto _end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef ZSTD_NODECOMPRESS
|
||||||
|
if (operation==zom_test) { outFileName=nulmark; FIO_setRemoveSrcFile(0); } /* test mode */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* No input filename ==> use stdin and stdout */
|
/* No input filename ==> use stdin and stdout */
|
||||||
filenameIdx += !filenameIdx; /* filenameTable[0] is stdin by default */
|
filenameIdx += !filenameIdx; /* filenameTable[0] is stdin by default */
|
||||||
if (!strcmp(filenameTable[0], stdinmark) && !outFileName) outFileName = stdoutmark; /* when input is stdin, default output is stdout */
|
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
|
#endif
|
||||||
} else { /* decompression or test */
|
} else { /* decompression or test */
|
||||||
#ifndef ZSTD_NODECOMPRESS
|
#ifndef ZSTD_NODECOMPRESS
|
||||||
if (operation==zom_test) { outFileName=nulmark; FIO_setRemoveSrcFile(0); } /* test mode */
|
|
||||||
FIO_setMemLimit(memLimit);
|
FIO_setMemLimit(memLimit);
|
||||||
if (filenameIdx==1 && outFileName)
|
if (filenameIdx==1 && outFileName)
|
||||||
operationResult = FIO_decompressFilename(outFileName, filenameTable[0], dictFileName);
|
operationResult = FIO_decompressFilename(outFileName, filenameTable[0], dictFileName);
|
||||||
|
@@ -383,6 +383,7 @@ $ZSTD -t --rm tmp1.zst
|
|||||||
test -f tmp1.zst # check file is still present
|
test -f tmp1.zst # check file is still present
|
||||||
split -b16384 tmp1.zst tmpSplit.
|
split -b16384 tmp1.zst tmpSplit.
|
||||||
$ZSTD -t tmpSplit.* && die "bad file not detected !"
|
$ZSTD -t tmpSplit.* && die "bad file not detected !"
|
||||||
|
./datagen | $ZSTD -c | $ZSTD -t
|
||||||
|
|
||||||
|
|
||||||
$ECHO "\n**** benchmark mode tests **** "
|
$ECHO "\n**** benchmark mode tests **** "
|
||||||
|
Reference in New Issue
Block a user