kernel32/tests: Allow more error codes from GetDiskFreeSpace.
This commit is contained in:
parent
e8d36ff9a1
commit
bdfa9c3a1b
|
@ -118,7 +118,10 @@ static void test_GetDiskFreeSpaceA(void)
|
|||
else
|
||||
{
|
||||
ok(ret ||
|
||||
(!ret && (GetLastError() == ERROR_NOT_READY || GetLastError() == ERROR_INVALID_DRIVE)),
|
||||
GetLastError() == ERROR_NOT_READY ||
|
||||
GetLastError() == ERROR_INVALID_DRIVE ||
|
||||
GetLastError() == ERROR_PATH_NOT_FOUND ||
|
||||
GetLastError() == ERROR_UNRECOGNIZED_VOLUME,
|
||||
"GetDiskFreeSpaceA(%s): ret=%d GetLastError=%d\n",
|
||||
drive, ret, GetLastError());
|
||||
if( GetVersion() & 0x80000000)
|
||||
|
@ -132,7 +135,10 @@ static void test_GetDiskFreeSpaceA(void)
|
|||
tot.QuadPart = sectors_per_cluster;
|
||||
tot.QuadPart = (tot.QuadPart * bytes_per_sector) * total_clusters;
|
||||
ret = pGetDiskFreeSpaceExA( drive, &d, &totEx, NULL);
|
||||
ok( ret || (!ret && ERROR_NOT_READY == GetLastError()),
|
||||
ok( ret ||
|
||||
GetLastError() == ERROR_NOT_READY ||
|
||||
GetLastError() == ERROR_PATH_NOT_FOUND ||
|
||||
GetLastError() == ERROR_UNRECOGNIZED_VOLUME,
|
||||
"GetDiskFreeSpaceExA( %s ) failed. GetLastError=%d\n", drive, GetLastError());
|
||||
ok( bytes_per_sector == 0 || /* empty cd rom drive */
|
||||
totEx.QuadPart <= tot.QuadPart,
|
||||
|
@ -188,7 +194,10 @@ static void test_GetDiskFreeSpaceW(void)
|
|||
"GetDiskFreeSpaceW(%c): ret=%d GetLastError=%d\n",
|
||||
drive[0], ret, GetLastError());
|
||||
else
|
||||
ok(ret || GetLastError() == ERROR_NOT_READY,
|
||||
ok( ret ||
|
||||
GetLastError() == ERROR_NOT_READY ||
|
||||
GetLastError() == ERROR_PATH_NOT_FOUND ||
|
||||
GetLastError() == ERROR_UNRECOGNIZED_VOLUME,
|
||||
"GetDiskFreeSpaceW(%c): ret=%d GetLastError=%d\n",
|
||||
drive[0], ret, GetLastError());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue