Module: wine Branch: master Commit: b66f9af10657a0c468cd3858074fb61d3d317095 URL: https://gitlab.winehq.org/wine/wine/-/commit/b66f9af10657a0c468cd3858074fb61...
Author: Francois Gouget fgouget@codeweavers.com Date: Sat Feb 25 20:27:36 2023 +0100
kernel32/tests: Fix the French GetNumberFormatEx() test on Windows 11.
Windows 11 uses a narrow non-breaking space instead of a plain one when formatting numbers.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54583
---
dlls/kernel32/tests/locale.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index f8d4ab14d38..5c99e644f15 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -1816,8 +1816,12 @@ static void test_GetNumberFormatEx(void) /* Test French formatting */ if (pIsValidLocaleName(frW)) { + const WCHAR *expected; ret = pGetNumberFormatEx(frW, NUO, L"-12345", NULL, buffer, ARRAY_SIZE(buffer)); - expect_wstr(ret, buffer, L"-12\xa0\x33\x34\x35,00"); /* Non breaking space */ + expected = (ret && wcschr(buffer, 0x202f)) ? + L"-12\x202f\x33\x34\x35,00" : /* Same but narrow (win11) */ + L"-12\xa0\x33\x34\x35,00"; /* Non breaking space */ + expect_wstr(ret, buffer, expected); } }