Commit 1431702f authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32/tests: Fix some test failures on Windows.

parent b75caec1
......@@ -2709,7 +2709,7 @@ static void test_FindFirstFileA(void)
/* try FindFirstFileA on "C:\foo\" */
SetLastError( 0xdeadbeaf );
if (!GetTempFileNameA( buffer, "foo", 0, nonexistent ) && GetLastError() == ERROR_ACCESS_DENIED)
if (!GetTempFileNameA( buffer, "foo", 0, nonexistent ))
{
char tmp[MAX_PATH];
GetTempPathA( sizeof(tmp), tmp );
......@@ -2825,8 +2825,12 @@ static void test_FindFirstFileA(void)
strcat(buffer2, "foo\\bar\\nul");
handle = FindFirstFileA(buffer2, &data);
err = GetLastError();
ok ( handle == INVALID_HANDLE_VALUE, "FindFirstFile on %s should fail\n", buffer2 );
ok ( err == ERROR_PATH_NOT_FOUND, "Bad Error number %d\n", err );
ok( handle == INVALID_HANDLE_VALUE || broken(1), /* win8 */
"FindFirstFile on %s should fail\n", buffer2 );
if (handle == INVALID_HANDLE_VALUE)
ok( err == ERROR_PATH_NOT_FOUND, "Bad Error number %d\n", err );
else
CloseHandle( handle );
/* try FindFirstFileA on "c:\foo\nul\bar" */
SetLastError( 0xdeadbeaf );
......
......@@ -718,7 +718,8 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header, const IMAG
else
{
ok( ldr_status == expect_status ||
broken(il_only && !expect_status && ldr_status == STATUS_INVALID_IMAGE_FORMAT),
broken(il_only && !expect_status && ldr_status == STATUS_INVALID_IMAGE_FORMAT) ||
broken(nt_header->Signature == IMAGE_OS2_SIGNATURE && ldr_status == STATUS_INVALID_IMAGE_NE_FORMAT),
"%u: wrong status %x/%x\n", line, ldr_status, expect_status );
ok( !expect_fallback || broken(il_only) || broken(wrong_machine),
"%u: failed with %x expected fallback\n", line, ldr_status );
......
......@@ -6774,13 +6774,13 @@ static void test_NLSVersion(void)
ok( !ret, "IsValidNLSVersion succeeded\n" );
ok( GetLastError() == 0, "wrong error %u\n", GetLastError() );
info.dwNLSVersion -= 0x200;
info.dwNLSVersion -= 0x800;
SetLastError( 0xdeadbeef );
ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info );
ok( !ret, "IsValidNLSVersion succeeded\n" );
ok( GetLastError() == 0, "wrong error %u\n", GetLastError() );
info.dwNLSVersion += 0x100;
info.dwNLSVersion += 0x700;
info.dwDefinedVersion += 0x100;
SetLastError( 0xdeadbeef );
ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment