From: Eric Pouech eric.pouech@gmail.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com --- include/wine/test.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/wine/test.h b/include/wine/test.h index 7779e252dd7..1690c5613d8 100644 --- a/include/wine/test.h +++ b/include/wine/test.h @@ -23,6 +23,7 @@
#include <stdarg.h> #include <stdlib.h> +#include <io.h> #include <windef.h> #include <winbase.h> #include <wine/debug.h> @@ -676,7 +677,8 @@ int main( int argc, char **argv ) else if (running_under_wine()) winetest_platform = "wine";
- if (GetEnvironmentVariableA( "WINETEST_COLOR", p, sizeof(p) )) winetest_color = atoi(p); + if (GetEnvironmentVariableA( "WINETEST_COLOR", p, sizeof(p) )) + winetest_color = !strcasecmp(p, "auto") ? isatty(fileno(stdout)) : atoi(p); if (GetEnvironmentVariableA( "WINETEST_DEBUG", p, sizeof(p) )) winetest_debug = atoi(p); if (GetEnvironmentVariableA( "WINETEST_INTERACTIVE", p, sizeof(p) )) winetest_interactive = atoi(p); if (GetEnvironmentVariableA( "WINETEST_REPORT_SUCCESS", p, sizeof(p) )) winetest_report_success = atoi(p);