=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: kernel32/tests: Accept more win8 return values.
Alexandre Julliard
julliard at winehq.org
Thu Dec 26 12:23:32 CST 2013
Module: wine
Branch: master
Commit: a803c496b2392940c2c5a1e33d1792e38481d889
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a803c496b2392940c2c5a1e33d1792e38481d889
Author: André Hentschel <nerv at dawncrow.de>
Date: Sat Dec 21 20:36:35 2013 +0100
kernel32/tests: Accept more win8 return values.
---
dlls/kernel32/tests/console.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c
index 547e1c0..cd7ac23 100644
--- a/dlls/kernel32/tests/console.c
+++ b/dlls/kernel32/tests/console.c
@@ -1025,7 +1025,8 @@ static void test_OpenCON(void)
for (i = 0; i < sizeof(accesses) / sizeof(accesses[0]); i++)
{
h = CreateFileW(conW, GENERIC_WRITE, 0, NULL, accesses[i], 0, NULL);
- ok(h != INVALID_HANDLE_VALUE, "Expected to open the CON device on write (%x)\n", accesses[i]);
+ ok(h != INVALID_HANDLE_VALUE || broken(accesses[i] == TRUNCATE_EXISTING /* Win8 */),
+ "Expected to open the CON device on write (%x)\n", accesses[i]);
CloseHandle(h);
h = CreateFileW(conW, GENERIC_READ, 0, NULL, accesses[i], 0, NULL);
@@ -1034,14 +1035,13 @@ static void test_OpenCON(void)
* NT, XP, Vista comply, but Win7 doesn't and allows opening CON with TRUNCATE_EXISTING
* So don't test when disposition is TRUNCATE_EXISTING
*/
- if (accesses[i] != TRUNCATE_EXISTING)
- {
- ok(h != INVALID_HANDLE_VALUE, "Expected to open the CON device on read (%x)\n", accesses[i]);
- }
+ ok(h != INVALID_HANDLE_VALUE || broken(accesses[i] == TRUNCATE_EXISTING /* Win7+ */),
+ "Expected to open the CON device on read (%x)\n", accesses[i]);
CloseHandle(h);
h = CreateFileW(conW, GENERIC_READ|GENERIC_WRITE, 0, NULL, accesses[i], 0, NULL);
ok(h == INVALID_HANDLE_VALUE, "Expected not to open the CON device on read-write (%x)\n", accesses[i]);
- ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Unexpected error %x\n", GetLastError());
+ ok(GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_INVALID_PARAMETER,
+ "Unexpected error %x\n", GetLastError());
}
}
More information about the wine-cvs
mailing list