kernel32: skip console tests if stdout is redirected (try 2)

Austin English austinenglish at gmail.com
Tue Jun 17 13:35:20 CDT 2014


try 2: only skip if stdout is redirected

For https://bugs.winehq.org/show_bug.cgi?id=28220.

--
-Austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20140617/58fa30ae/attachment.html>
-------------- next part --------------
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index 218a0d3..abe72db 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -1334,7 +1334,13 @@ static void test_Console(void)
     }
     /* now verify everything's ok */
     ok(startup.hStdInput != INVALID_HANDLE_VALUE, "Opening ConIn\n");
-    ok(startup.hStdOutput != INVALID_HANDLE_VALUE, "Opening ConOut\n");
+
+    /* skip instead of failing if stdout is being redirected */
+    if(startup.hStdOutput==INVALID_HANDLE_VALUE)
+    {
+        skip("Cannot open ConOut, skipping tests\n");
+        return;
+    }
     startup.hStdError = startup.hStdOutput;
 
     ok(GetConsoleScreenBufferInfo(startup.hStdOutput, &sbi), "Getting sb info\n");


More information about the wine-patches mailing list