1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-30 22:23:13 +03:00

[pzstd] Fix test mode for streaming input

This commit is contained in:
Nick Terrell
2016-10-26 00:09:39 -07:00
parent 8c6c686d0a
commit ac4310d303

View File

@ -303,6 +303,12 @@ Options::Status Options::parse(int argc, const char **argv) {
} // while (*options != 0); } // while (*options != 0);
} // for (int i = 1; i < argc; ++i); } // for (int i = 1; i < argc; ++i);
// Set options for test mode
if (test) {
outputFile = nullOutput;
keepSource = true;
}
// Input file defaults to standard input if not provided. // Input file defaults to standard input if not provided.
if (localInputFiles.empty()) { if (localInputFiles.empty()) {
localInputFiles.emplace_back(kStdIn); localInputFiles.emplace_back(kStdIn);
@ -399,11 +405,6 @@ Options::Status Options::parse(int argc, const char **argv) {
verbosity = 1; verbosity = 1;
} }
// Set options for test mode
if (test) {
outputFile = nullOutput;
keepSource = true;
}
return Status::Success; return Status::Success;
} }