Module: wine Branch: master Commit: ad5c8fb6ffacd965312aee36b182ca99d5ccb162 URL: https://gitlab.winehq.org/wine/wine/-/commit/ad5c8fb6ffacd965312aee36b182ca9...
Author: Francois Gouget fgouget@codeweavers.com Date: Sat Feb 25 19:32:11 2023 +0100
kernel32/tests: Fix the NLSVersion test on Windows 10 22H2.
Microsoft backported support for the 60403 NLS version from Windows 11 21H2 to Windows 10 22H2 to ensure better compatibility between the two systems. This is similar to when they preserved support for NLS version 6020f when switching Windows 10 2004 to 60305. So use larger version changes to check that IsValidNLSVersion() does reject invalid versions.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54582
---
dlls/kernel32/tests/locale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index b2c581dc518..a4c97286dc5 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -7865,13 +7865,13 @@ static void test_NLSVersion(void) ok( ret, "IsValidNLSVersion failed err %lu\n", GetLastError() ); ok( GetLastError() == 0xdeadbeef, "wrong error %lu\n", GetLastError() );
- info.dwNLSVersion += 0x100; + info.dwNLSVersion += 0x700; /* much higher ver -> surely invalid */ SetLastError( 0xdeadbeef ); ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); ok( !ret, "IsValidNLSVersion succeeded\n" ); ok( GetLastError() == 0, "wrong error %lu\n", GetLastError() );
- info.dwNLSVersion -= 0x800; + info.dwNLSVersion -= 2 * 0x700; /* much lower ver -> surely invalid */ SetLastError( 0xdeadbeef ); ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); ok( !ret, "IsValidNLSVersion succeeded\n" );