Huw Davies : kernel32/tests: Add some GetLastError() values for Windows 8 and 10.

Alexandre Julliard julliard at winehq.org
Tue Nov 22 16:34:01 CST 2016


Module: wine
Branch: master
Commit: f1b5e98ad8bc51e6781a012d4aa29ff25c9fc5a8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f1b5e98ad8bc51e6781a012d4aa29ff25c9fc5a8

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Nov 22 12:00:08 2016 +0000

kernel32/tests: Add some GetLastError() values for Windows 8 and 10.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/tests/console.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c
index d8584c4..cdcfa15 100644
--- a/dlls/kernel32/tests/console.c
+++ b/dlls/kernel32/tests/console.c
@@ -2616,27 +2616,35 @@ static void test_ReadConsole(void)
     SetLastError(0xdeadbeef);
     ret = GetFileSize(std_input, NULL);
     ok(ret == INVALID_FILE_SIZE, "expected INVALID_FILE_SIZE, got %#x\n", ret);
-    ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
+    ok(GetLastError() == ERROR_INVALID_HANDLE ||
+       GetLastError() == ERROR_INVALID_FUNCTION, /* Win 8, 10 */
+       "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
 
     bytes = 0xdeadbeef;
     SetLastError(0xdeadbeef);
     ret = ReadFile(std_input, buf, -128, &bytes, NULL);
     ok(!ret, "expected 0, got %u\n", ret);
-    ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY, "expected ERROR_NOT_ENOUGH_MEMORY, got %d\n", GetLastError());
+    ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
+       GetLastError() == ERROR_NOACCESS, /* Win 8, 10 */
+       "expected ERROR_NOT_ENOUGH_MEMORY, got %d\n", GetLastError());
     ok(!bytes, "expected 0, got %u\n", bytes);
 
     bytes = 0xdeadbeef;
     SetLastError(0xdeadbeef);
     ret = ReadConsoleA(std_input, buf, -128, &bytes, NULL);
     ok(!ret, "expected 0, got %u\n", ret);
-    ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY, "expected ERROR_NOT_ENOUGH_MEMORY, got %d\n", GetLastError());
+    ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
+       GetLastError() == ERROR_NOACCESS, /* Win 8, 10 */
+       "expected ERROR_NOT_ENOUGH_MEMORY, got %d\n", GetLastError());
     ok(bytes == 0xdeadbeef, "expected 0xdeadbeef, got %#x\n", bytes);
 
     bytes = 0xdeadbeef;
     SetLastError(0xdeadbeef);
     ret = ReadConsoleW(std_input, buf, -128, &bytes, NULL);
     ok(!ret, "expected 0, got %u\n", ret);
-    ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY, "expected ERROR_NOT_ENOUGH_MEMORY, got %d\n", GetLastError());
+    ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
+       GetLastError() == ERROR_NOACCESS, /* Win 8, 10 */
+       "expected ERROR_NOT_ENOUGH_MEMORY, got %d\n", GetLastError());
     ok(bytes == 0xdeadbeef, "expected 0xdeadbeef, got %#x\n", bytes);
 }
 




More information about the wine-cvs mailing list