mirror of
https://github.com/facebook/zstd.git
synced 2024-12-01 00:16:44 +08:00
fixed : cli : forgotten mandatory argument
This commit is contained in:
parent
27b5ac666e
commit
714464f05d
@ -434,6 +434,8 @@ int main(int argCount, const char* argv[])
|
||||
filenameTable[filenameIdx++] = argument;
|
||||
}
|
||||
|
||||
if (lastCommand) { DISPLAY("error : command must be followed by argument \n"); return 1; } /* forgotten argument */
|
||||
|
||||
/* Welcome message (if verbose) */
|
||||
DISPLAYLEVEL(3, WELCOME_MESSAGE);
|
||||
|
||||
|
@ -59,9 +59,12 @@ rm tmpCompressed
|
||||
$ZSTD tmp -o tmpCompressed
|
||||
ls tmpCompressed # must work
|
||||
$ECHO "test : -o must be followed by filename (must fail)"
|
||||
$ZSTD tmp -of tmpCompressed && die "-o must be followed by filename"
|
||||
$ZSTD tmp -of tmpCompressed && die "-o must be followed by filename "
|
||||
$ECHO "test : force write, correct order"
|
||||
$ZSTD tmp -fo tmpCompressed
|
||||
$ECHO "test : forgotten argument"
|
||||
cp tmp tmp2
|
||||
$ZSTD tmp2 -fo && die "-o must be followed by filename "
|
||||
$ECHO "test : implied stdout when input is stdin"
|
||||
$ECHO bob | $ZSTD | $ZSTD -d
|
||||
$ECHO "test : null-length file roundtrip"
|
||||
|
Loading…
Reference in New Issue
Block a user