[PATCH v2] kernel32/tests: Detect and handle a redirected stdin.

Alex Henrie <[email protected]>
Newsgroups gmane.comp.emulators.wine.patches
Message-ID <[email protected]>
Signed-off-by: Alex Henrie <[email protected]>
---
v2: Simply skip the tests if the input is redirected.
---
 dlls/kernel32/tests/console.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c
index a14bc45034..926c052686 100644
--- a/dlls/kernel32/tests/console.c
+++ b/dlls/kernel32/tests/console.c
@@ -2582,6 +2582,11 @@ static void test_ReadConsole(void)
 
     SetLastError(0xdeadbeef);
     ret = GetFileSize(std_input, NULL);
+    if (GetLastError() == 0xdeadbeef)
+    {
+        skip("stdin is redirected\n");
+        return;
+    }
     ok(ret == INVALID_FILE_SIZE, "expected INVALID_FILE_SIZE, got %#x\n", ret);
     ok(GetLastError() == ERROR_INVALID_HANDLE ||
        GetLastError() == ERROR_INVALID_FUNCTION, /* Win 8, 10 */
-- 
2.14.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.