Allow tests to fake stdin/stdout/stderr is a console

We've been unable to effectively test cases where stdin/stdout/stderr
are consoles, because in our test cases they generally aren't. Allow the
command line flags `--fake-std{in,out,err}-is-console` to tell the CLI
to pretend that std{in,out,err} is a console.
This commit is contained in:
Nick Terrell
2022-12-14 15:44:09 -08:00
committed by Nick Terrell
parent 031de3c69c
commit e58a39f84e
5 changed files with 55 additions and 6 deletions
+1 -1
View File
@@ -3010,7 +3010,7 @@ int FIO_listMultipleFiles(unsigned numFiles, const char** filenameTable, int dis
} }
if (numFiles == 0) {
if (!IS_CONSOLE(stdin)) {
if (!UTIL_isConsole(stdin)) {
DISPLAYLEVEL(1, "zstd: --list does not support reading from standard input \n");
}
DISPLAYLEVEL(1, "No files given \n");