Default to ascii charset when on a dumb terminal (or cmd.exe)
This commit is contained in:
parent
0184f8f674
commit
09fc65eae3
1 changed files with 4 additions and 1 deletions
|
@ -127,11 +127,14 @@ int main(int argc, char *argv[]) {
|
|||
{0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
bool use_ascii = !strcmp("1", getenv("CRITERION_USE_ASCII") ?: "0")
|
||||
|| !strcmp("dumb", getenv("TERM") ?: "dumb");
|
||||
|
||||
criterion_options = (struct criterion_options) {
|
||||
.always_succeed = !strcmp("1", getenv("CRITERION_ALWAYS_SUCCEED") ?: "0"),
|
||||
.no_early_exit = !strcmp("1", getenv("CRITERION_NO_EARLY_EXIT") ?: "0"),
|
||||
.fail_fast = !strcmp("1", getenv("CRITERION_FAIL_FAST") ?: "0"),
|
||||
.use_ascii = !strcmp("1", getenv("CRITERION_USE_ASCII") ?: "0"),
|
||||
.use_ascii = use_ascii,
|
||||
.logging_threshold = atoi(getenv("CRITERION_VERBOSITY_LEVEL") ?: "2"),
|
||||
#ifdef HAVE_FNMATCH
|
||||
.pattern = getenv("CRITERION_TEST_PATTERN"),
|
||||
|
|
Loading…
Add table
Reference in a new issue