Kirill K. Smirnov : kernel32/tests: Add tests for console codepages.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri May 11 07:28:01 CDT 2007
Module: wine
Branch: master
Commit: 24bf66180b7563b49d6460e2c49b944b63eab2c1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=24bf66180b7563b49d6460e2c49b944b63eab2c1
Author: Kirill K. Smirnov <lich at math.spbu.ru>
Date: Thu May 10 21:24:11 2007 +0400
kernel32/tests: Add tests for console codepages.
---
dlls/kernel32/tests/process.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index 162a622..a5f240a 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -1175,6 +1175,20 @@ static void test_Console(void)
cpInC = GetConsoleCP();
cpOutC = GetConsoleOutputCP();
+
+ /* Try to set invalid CP */
+ SetLastError(0xdeadbeef);
+ ok(!SetConsoleCP(0), "Shouldn't succeed\n");
+ ok(GetLastError()==ERROR_INVALID_PARAMETER,
+ "GetLastError: expecting %u got %u\n",
+ ERROR_INVALID_PARAMETER, GetLastError());
+
+ SetLastError(0xdeadbeef);
+ ok(!SetConsoleOutputCP(0), "Shouldn't succeed\n");
+ ok(GetLastError()==ERROR_INVALID_PARAMETER,
+ "GetLastError: expecting %u got %u\n",
+ ERROR_INVALID_PARAMETER, GetLastError());
+
SetConsoleCP(cpIn);
SetConsoleOutputCP(cpOut);
@@ -1213,8 +1227,8 @@ static void test_Console(void)
okChildInt("Console", "InputMode", modeIn);
okChildInt("Console", "OutputMode", modeOut);
- todo_wine ok(cpInC == 1252, "Wrong console CP (expected 1252 got %d/%d)\n", cpInC, cpIn);
- todo_wine ok(cpOutC == 1252, "Wrong console-SB CP (expected 1252 got %d/%d)\n", cpOutC, cpOut);
+ ok(cpInC == 1252, "Wrong console CP (expected 1252 got %d/%d)\n", cpInC, cpIn);
+ ok(cpOutC == 1252, "Wrong console-SB CP (expected 1252 got %d/%d)\n", cpOutC, cpOut);
ok(modeInC == (modeIn ^ 1), "Wrong console mode\n");
ok(modeOutC == (modeOut ^ 1), "Wrong console-SB mode\n");
ok(sbiC.dwCursorPosition.X == (sbi.dwCursorPosition.X ^ 1), "Wrong cursor position\n");
More information about the wine-cvs
mailing list