[PATCH] user32/tests: Fix the clipboard CF_LOCALE test.

Francois Gouget fgouget at codeweavers.com
Thu May 20 06:42:12 CDT 2021


By default CF_LOCALE matches the current input language, not the default
user LCID.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 dlls/user32/tests/clipboard.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c
index 6fc4325e985..73e30996229 100644
--- a/dlls/user32/tests/clipboard.c
+++ b/dlls/user32/tests/clipboard.c
@@ -777,10 +777,11 @@ static void test_synthesized(void)
             case CF_LOCALE:
             {
                 UINT *ptr = GlobalLock( data );
+                DWORD layout = (DWORD)GetKeyboardLayout(0) & 0xffff;
                 ok( GlobalSize( data ) == sizeof(*ptr), "%u: size %lu\n", i, GlobalSize( data ));
-                ok( *ptr == GetUserDefaultLCID() ||
+                ok( *ptr == layout ||
                     broken( *ptr == MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT )),
-                    "%u: CF_LOCALE %08x/%08x\n", i, *ptr, GetUserDefaultLCID() );
+                    "%u: CF_LOCALE %04x/%04x\n", i, *ptr, layout );
                 GlobalUnlock( data );
                 break;
             }
-- 
2.20.1



More information about the wine-devel mailing list