kernel32/tests: Fix some test failures on Windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b75caec103
commit
1431702f5a
|
@ -2709,7 +2709,7 @@ static void test_FindFirstFileA(void)
|
||||||
|
|
||||||
/* try FindFirstFileA on "C:\foo\" */
|
/* try FindFirstFileA on "C:\foo\" */
|
||||||
SetLastError( 0xdeadbeaf );
|
SetLastError( 0xdeadbeaf );
|
||||||
if (!GetTempFileNameA( buffer, "foo", 0, nonexistent ) && GetLastError() == ERROR_ACCESS_DENIED)
|
if (!GetTempFileNameA( buffer, "foo", 0, nonexistent ))
|
||||||
{
|
{
|
||||||
char tmp[MAX_PATH];
|
char tmp[MAX_PATH];
|
||||||
GetTempPathA( sizeof(tmp), tmp );
|
GetTempPathA( sizeof(tmp), tmp );
|
||||||
|
@ -2825,8 +2825,12 @@ static void test_FindFirstFileA(void)
|
||||||
strcat(buffer2, "foo\\bar\\nul");
|
strcat(buffer2, "foo\\bar\\nul");
|
||||||
handle = FindFirstFileA(buffer2, &data);
|
handle = FindFirstFileA(buffer2, &data);
|
||||||
err = GetLastError();
|
err = GetLastError();
|
||||||
ok ( handle == INVALID_HANDLE_VALUE, "FindFirstFile on %s should fail\n", buffer2 );
|
ok( handle == INVALID_HANDLE_VALUE || broken(1), /* win8 */
|
||||||
ok ( err == ERROR_PATH_NOT_FOUND, "Bad Error number %d\n", err );
|
"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" */
|
/* try FindFirstFileA on "c:\foo\nul\bar" */
|
||||||
SetLastError( 0xdeadbeaf );
|
SetLastError( 0xdeadbeaf );
|
||||||
|
|
|
@ -718,7 +718,8 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header, const IMAG
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ok( ldr_status == expect_status ||
|
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 );
|
"%u: wrong status %x/%x\n", line, ldr_status, expect_status );
|
||||||
ok( !expect_fallback || broken(il_only) || broken(wrong_machine),
|
ok( !expect_fallback || broken(il_only) || broken(wrong_machine),
|
||||||
"%u: failed with %x expected fallback\n", line, ldr_status );
|
"%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( !ret, "IsValidNLSVersion succeeded\n" );
|
||||||
ok( GetLastError() == 0, "wrong error %u\n", GetLastError() );
|
ok( GetLastError() == 0, "wrong error %u\n", GetLastError() );
|
||||||
|
|
||||||
info.dwNLSVersion -= 0x200;
|
info.dwNLSVersion -= 0x800;
|
||||||
SetLastError( 0xdeadbeef );
|
SetLastError( 0xdeadbeef );
|
||||||
ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info );
|
ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info );
|
||||||
ok( !ret, "IsValidNLSVersion succeeded\n" );
|
ok( !ret, "IsValidNLSVersion succeeded\n" );
|
||||||
ok( GetLastError() == 0, "wrong error %u\n", GetLastError() );
|
ok( GetLastError() == 0, "wrong error %u\n", GetLastError() );
|
||||||
|
|
||||||
info.dwNLSVersion += 0x100;
|
info.dwNLSVersion += 0x700;
|
||||||
info.dwDefinedVersion += 0x100;
|
info.dwDefinedVersion += 0x100;
|
||||||
SetLastError( 0xdeadbeef );
|
SetLastError( 0xdeadbeef );
|
||||||
ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info );
|
ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info );
|
||||||
|
|
Loading…
Reference in New Issue