From 0a0e94904854a77e9e0363ca86e1fa9a7ed837fc Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Mon, 23 Jan 2012 12:26:48 +0000 Subject: [PATCH] [ADVPACK_WINETEST] * Sync to Wine 1.3.37. svn path=/trunk/; revision=55098 --- rostests/winetests/advpack/advpack.c | 10 ++++----- rostests/winetests/advpack/files.c | 4 ++-- rostests/winetests/advpack/install.c | 32 ++++++++-------------------- 3 files changed, 16 insertions(+), 30 deletions(-) diff --git a/rostests/winetests/advpack/advpack.c b/rostests/winetests/advpack/advpack.c index 3ead0f25c4b..1345d72f6a4 100644 --- a/rostests/winetests/advpack/advpack.c +++ b/rostests/winetests/advpack/advpack.c @@ -130,7 +130,7 @@ static void delnode_test(void) HRESULT hr; HANDLE hn; CHAR currDir[MAX_PATH]; - int currDirLen; + UINT currDirLen; /* Native DelNode apparently does not support relative paths, so we use absolute paths for testing */ @@ -446,7 +446,7 @@ static void translateinfstringex_test(void) ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); ok(!lstrcmpi(buffer, PROG_FILES_ROOT), "Expected %s, got %s\n", PROG_FILES_ROOT, buffer); - ok(size == lstrlenA(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n", + ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n", lstrlenA(PROG_FILES_ROOT)+1, size); memset(buffer, 'a', APP_PATH_LEN); @@ -457,7 +457,7 @@ static void translateinfstringex_test(void) ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); ok(!lstrcmpi(buffer, PROG_FILES_ROOT), "Expected %s, got %s\n", PROG_FILES_ROOT, buffer); - ok(size == lstrlenA(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n", + ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n", lstrlenA(PROG_FILES_ROOT)+1, size); { @@ -473,7 +473,7 @@ static void translateinfstringex_test(void) ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); ok(!lstrcmpi(buffer, drive), "Expected %s, got %s\n", drive, buffer); - ok(size == lstrlenA(drive)+1, "Expected size %d, got %d\n", + ok(size == strlen(drive)+1, "Expected size %d, got %d\n", lstrlenA(drive)+1, size); } @@ -531,7 +531,7 @@ static void translateinfstringex_test(void) ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); ok(!lstrcmpi(buffer, PROG_FILES_ROOT), "Expected %s, got %s\n", PROG_FILES_ROOT, buffer); - ok(size == lstrlenA(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n", + ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n", lstrlenA(PROG_FILES_ROOT)+1, size); /* close the INF again */ diff --git a/rostests/winetests/advpack/files.c b/rostests/winetests/advpack/files.c index 5c6ea8de1f2..b29168a2cab 100644 --- a/rostests/winetests/advpack/files.c +++ b/rostests/winetests/advpack/files.c @@ -29,12 +29,12 @@ #define FOLDER_THRESHOLD 900000 /* function pointers */ -HMODULE hAdvPack; +static HMODULE hAdvPack; static HRESULT (WINAPI *pAddDelBackupEntry)(LPCSTR, LPCSTR, LPCSTR, DWORD); static HRESULT (WINAPI *pExtractFiles)(LPCSTR, LPCSTR, DWORD, LPCSTR, LPVOID, DWORD); static HRESULT (WINAPI *pAdvInstallFile)(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,DWORD,DWORD); -CHAR CURR_DIR[MAX_PATH]; +static CHAR CURR_DIR[MAX_PATH]; static void init_function_pointers(void) { diff --git a/rostests/winetests/advpack/install.c b/rostests/winetests/advpack/install.c index 3b0954fcf23..6a4d8d617a9 100644 --- a/rostests/winetests/advpack/install.c +++ b/rostests/winetests/advpack/install.c @@ -95,7 +95,7 @@ static void test_RunSetupCommand(void) hr = pRunSetupCommand(NULL, "idontexist.exe", "Install", systemdir, "Title", &hexe, 0, NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); - ok(hexe == NULL, "Expcted hexe to be NULL\n"); + ok(hexe == NULL, "Expected hexe to be NULL\n"); ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n"); /* try a bad directory */ @@ -103,15 +103,13 @@ static void test_RunSetupCommand(void) hr = pRunSetupCommand(NULL, "winver.exe", "Install", "non\\existent\\directory", "Title", &hexe, 0, NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_DIRECTORY), "Expected HRESULT_FROM_WIN32(ERROR_DIRECTORY), got %d\n", hr); - ok(hexe == NULL, "Expcted hexe to be NULL\n"); + ok(hexe == NULL, "Expected hexe to be NULL\n"); ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n"); /* try to run an exe with the RSC_FLAG_INF flag */ hexe = (HANDLE)0xdeadbeef; hr = pRunSetupCommand(NULL, "winver.exe", "Install", systemdir, "Title", &hexe, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(is_spapi_err(hr) || - hr == E_FAIL, /* win9x */ - "Expected a setupapi error or E_FAIL, got %d\n", hr); + ok(is_spapi_err(hr), "Expected a setupapi error, got %d\n", hr); ok(hexe == (HANDLE)0xdeadbeef, "Expected hexe to be 0xdeadbeef\n"); ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n"); @@ -144,9 +142,7 @@ static void test_RunSetupCommand(void) /* try a relative path to the INF, with working dir provided */ hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == ERROR_SUCCESS || - hr == E_FAIL, /* win9x */ - "Expected ERROR_SUCCESS, got %d\n", hr); + ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr); /* try a relative path to the INF, NULL working dir */ hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); @@ -155,15 +151,11 @@ static void test_RunSetupCommand(void) /* try a relative path to the INF, empty working dir */ hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == ERROR_SUCCESS || - hr == E_FAIL, /* win9x */ - "Expected ERROR_SUCCESS or E_FAIL, got %d\n", hr); + ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr); /* try only the INF filename, with working dir provided */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hr == E_FAIL, /* win9x */ - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or E_FAIL, got %d\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); /* try only the INF filename, NULL working dir */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); @@ -172,9 +164,7 @@ static void test_RunSetupCommand(void) /* try only the INF filename, empty working dir */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hr == E_FAIL, /* win9x */ - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or E_FAIL, got %d\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); DeleteFileA("one\\test.inf"); RemoveDirectoryA("one"); @@ -183,9 +173,7 @@ static void test_RunSetupCommand(void) /* try INF file in the current directory, working directory provided */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", CURR_DIR, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hr == E_FAIL, /* win9x */ - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or E_FAIL, got %d\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); /* try INF file in the current directory, NULL working directory */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); @@ -194,9 +182,7 @@ static void test_RunSetupCommand(void) /* try INF file in the current directory, empty working directory */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", CURR_DIR, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hr == E_FAIL, /* win9x */ - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or E_FAIL, got %d\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); } static void test_LaunchINFSection(void)