[PATCH] user32: small improvements / fixes to the ES_PASSWORD test

Lei Zhang thestig at google.com
Fri Aug 31 16:59:02 CDT 2007


Hi,

This patch fixes an erroneous message and checks return values when appropriate.
-------------- next part --------------
From 2414664ea88b4d18e6f96a75d336bb8a2d82efda Mon Sep 17 00:00:00 2001
From: Lei Zhang <thestig at google.com>
Date: Fri, 31 Aug 2007 14:54:52 -0700
Subject: [PATCH] user32: small improvements / fixes to the ES_PASSWORD test
---
 dlls/user32/tests/edit.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c
index 3337aa2..19fc365 100644
--- a/dlls/user32/tests/edit.c
+++ b/dlls/user32/tests/edit.c
@@ -1019,11 +1019,12 @@ static void test_espassword(void)
 
     /* select all, cut (ctrl-x) */
     SendMessage(hwEdit, EM_SETSEL, 0, -1);
-    SendMessage(hwEdit, WM_CHAR, 24, 0);
+    r = SendMessage(hwEdit, WM_CHAR, 24, 0);
+    todo_wine { ok(r == 1, "Expected: %d, got: %d\n", 1, r); }
 
     /* get text */
     r = SendMessage(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer);
-    ok(r == strlen(password), "Expected: %s, got len %d\n", password, r);
+    ok(r == strlen(password), "Expected: %d, got len %d\n", strlen(password), r);
     ok(strcmp(buffer, password) == 0, "expected %s, got %s\n", password, buffer);
 
     r = OpenClipboard(hwEdit);
@@ -1035,8 +1036,10 @@ static void test_espassword(void)
 
     /* select all, copy (ctrl-c) and paste (ctrl-v) */
     SendMessage(hwEdit, EM_SETSEL, 0, -1);
-    SendMessage(hwEdit, WM_CHAR, 3, 0);
-    SendMessage(hwEdit, WM_CHAR, 22, 0);
+    r = SendMessage(hwEdit, WM_CHAR, 3, 0);
+    todo_wine { ok(r == 1, "Expected: %d, got: %d\n", 1, r); }
+    r = SendMessage(hwEdit, WM_CHAR, 22, 0);
+    todo_wine { ok(r == 1, "Expected: %d, got: %d\n", 1, r); }
 
     /* get text */
     buffer[0] = 0;
-- 
1.4.1


More information about the wine-patches mailing list