Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/kernel32/tests/locale.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 4c1e1b4d73..a8efb60eb5 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -6653,17 +6653,29 @@ static void test_NLSVersion(void) win_skip( "GetNLSVersion not available\n" ); return; } + SetLastError( 0xdeadbeef ); memset( &info, 0xcc, sizeof(info) ); - info.dwNLSVersionInfoSize = sizeof(info); + info.dwNLSVersionInfoSize = offsetof( NLSVERSIONINFO, dwEffectiveId ); ret = pGetNLSVersion( COMPARE_STRING, MAKELANGID( LANG_FRENCH, SUBLANG_FRENCH_CANADIAN ), (NLSVERSIONINFO *)&info ); ok( ret, "GetNLSVersion failed err %u\n", GetLastError() ); - ok( info.dwEffectiveId == MAKELANGID( LANG_FRENCH, SUBLANG_FRENCH_CANADIAN ), - "wrong id %x\n", info.dwEffectiveId ); - ok( IsEqualIID( &info.guidCustomVersion, &guid_fr ) || - broken( IsEqualIID( &info.guidCustomVersion, &guid_null )), /* <= win7 */ - "wrong guid %s\n", debugstr_guid(&info.guidCustomVersion) ); + + SetLastError( 0xdeadbeef ); + memset( &info, 0xcc, sizeof(info) ); + info.dwNLSVersionInfoSize = sizeof(info); + ret = pGetNLSVersion( COMPARE_STRING, MAKELANGID( LANG_FRENCH, SUBLANG_FRENCH_CANADIAN ), + (NLSVERSIONINFO *)&info ); + ok( ret || GetLastError() == ERROR_INSUFFICIENT_BUFFER /* < Vista */, + "GetNLSVersion failed err %u\n", GetLastError() ); + if (ret) + { + ok( info.dwEffectiveId == MAKELANGID( LANG_FRENCH, SUBLANG_FRENCH_CANADIAN ), + "wrong id %x\n", info.dwEffectiveId ); + ok( IsEqualIID( &info.guidCustomVersion, &guid_fr ) || + broken( IsEqualIID( &info.guidCustomVersion, &guid_null )), /* <= win7 */ + "wrong guid %s\n", debugstr_guid(&info.guidCustomVersion) ); + }
SetLastError( 0xdeadbeef ); info.dwNLSVersionInfoSize = 8;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/kernel32/tests/thread.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index e068797ff5..a9869863b4 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -1218,10 +1218,12 @@ static void test_GetThreadSelectorEntry(void) SetLastError( 0xdeadbeef ); ret = GetThreadSelectorEntry(GetCurrentThread(), 0xdeadbeef, &entry); ok(!ret, "GetThreadSelectorEntry(invalid) succeeded\n"); - ok( GetLastError() == ERROR_GEN_FAILURE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_GEN_FAILURE + || GetLastError() == ERROR_INVALID_THREAD_ID /* 32-bit */, "wrong error %u\n", GetLastError() ); ret = GetThreadSelectorEntry(GetCurrentThread(), ctx.SegDs + 0x100, &entry); ok(!ret, "GetThreadSelectorEntry(invalid) succeeded\n"); - ok( GetLastError() == ERROR_GEN_FAILURE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_GEN_FAILURE + || GetLastError() == ERROR_NOACCESS /* 32-bit */, "wrong error %u\n", GetLastError() );
memset(&entry, 0x11, sizeof(entry)); ret = GetThreadSelectorEntry(GetCurrentThread(), ctx.SegFs, &entry);