setupapi/tests: Fix a test failure on Vista (and skip some tests).

This commit is contained in:
Paul Vriens 2008-12-17 12:30:30 +01:00 committed by Alexandre Julliard
parent 05988f4fbc
commit 6c72061507
2 changed files with 15 additions and 2 deletions

View File

@ -160,8 +160,9 @@ static void test_SetupCopyOEMInf(void)
res = pSetupCopyOEMInfA("", NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL);
ok(res == FALSE, "Expected FALSE, got %d\n", res);
ok(GetLastError() == ERROR_FILE_NOT_FOUND ||
GetLastError() == ERROR_BAD_PATHNAME, /* Win98 */
"Expected ERROR_FILE_NOT_FOUND or ERROR_BAD_PATHNAME, got %d\n", GetLastError());
GetLastError() == ERROR_BAD_PATHNAME || /* Win98 */
GetLastError() == ERROR_INVALID_PARAMETER, /* Vista, W2K8 */
"Unexpected error : %d\n", GetLastError());
/* try a relative nonexistent SourceInfFileName */
SetLastError(0xdeadbeef);
@ -196,6 +197,17 @@ static void test_SetupCopyOEMInf(void)
SetLastError(0xdeadbeef);
res = pSetupCopyOEMInfA(tmpfile, NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL);
ok(res == FALSE, "Expected FALSE, got %d\n", res);
if (GetLastError() == ERROR_WRONG_INF_TYPE)
{
/* FIXME:
* Vista needs a [Manufacturer] entry in the inf file. Doing this will give some
* popups during the installation though as it also needs a catalog file (signed?).
*/
win_skip("Needs a different inf file on Vista/W2K8\n");
DeleteFile(tmpfile);
return;
}
ok(GetLastError() == ERROR_FILE_NOT_FOUND ||
GetLastError() == ERROR_FILE_EXISTS, /* Win98 */
"Expected ERROR_FILE_NOT_FOUND or ERROR_FILE_EXISTS, got %d\n", GetLastError());

View File

@ -1214,6 +1214,7 @@ DECL_WINELIB_SETUPAPI_TYPE_AW(PSP_INF_SIGNER_INFO)
#define ERROR_SET_SYSTEM_RESTORE_POINT (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x236)
#define ERROR_INCORRECTLY_COPIED_INF (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x237)
#define ERROR_SCE_DISABLED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x238)
#define ERROR_WRONG_INF_TYPE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x24A)
#define ERROR_NO_DEFAULT_INTERFACE_DEVICE ERROR_NO_DEFAULT_DEVICE_INTERFACE
#define ERROR_INTERFACE_DEVICE_ACTIVE ERROR_DEVICE_INTERFACE_ACTIVE
#define ERROR_INTERFACE_DEVICE_REMOVED ERROR_DEVICE_INTERFACE_REMOVED