Commit c505c0fe authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi/tests: Get rid of workarounds for win9x test failures.

parent e82a4896
...@@ -302,6 +302,7 @@ static void create_database(const CHAR *name, const msi_table *tables, int num_t ...@@ -302,6 +302,7 @@ static void create_database(const CHAR *name, const msi_table *tables, int num_t
static BOOL create_package(LPWSTR path) static BOOL create_package(LPWSTR path)
{ {
static const WCHAR slashW[] = {'\\',0};
DWORD len; DWORD len;
/* Prepare package */ /* Prepare package */
...@@ -315,9 +316,8 @@ static BOOL create_package(LPWSTR path) ...@@ -315,9 +316,8 @@ static BOOL create_package(LPWSTR path)
if (!len) if (!len)
return FALSE; return FALSE;
/* lstrcatW does not work on win95 */ lstrcatW(path, slashW);
path[len - 1] = '\\'; lstrcatW(path, szMsifile);
memcpy(&path[len], szMsifile, sizeof(szMsifile));
return TRUE; return TRUE;
} }
...@@ -949,9 +949,7 @@ static HRESULT Installer_RegistryValueW(HKEY hkey, LPCWSTR szKey, LPCWSTR szValu ...@@ -949,9 +949,7 @@ static HRESULT Installer_RegistryValueW(HKEY hkey, LPCWSTR szKey, LPCWSTR szValu
V_BSTR(&vararg) = SysAllocString(szValue); V_BSTR(&vararg) = SysAllocString(szValue);
hr = Installer_RegistryValue(hkey, szKey, vararg, &varresult, VT_BSTR); hr = Installer_RegistryValue(hkey, szKey, vararg, &varresult, VT_BSTR);
if (V_BSTR(&varresult)) if (V_BSTR(&varresult)) lstrcpyW(szString, V_BSTR(&varresult));
/* lstrcpyW is not implemented on Win95 (lstrlenW is though) */
memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
VariantClear(&varresult); VariantClear(&varresult);
return hr; return hr;
} }
...@@ -967,8 +965,7 @@ static HRESULT Installer_RegistryValueI(HKEY hkey, LPCWSTR szKey, int iValue, LP ...@@ -967,8 +965,7 @@ static HRESULT Installer_RegistryValueI(HKEY hkey, LPCWSTR szKey, int iValue, LP
V_I4(&vararg) = iValue; V_I4(&vararg) = iValue;
hr = Installer_RegistryValue(hkey, szKey, vararg, &varresult, vtResult); hr = Installer_RegistryValue(hkey, szKey, vararg, &varresult, vtResult);
if (SUCCEEDED(hr) && vtResult == VT_BSTR) if (SUCCEEDED(hr) && vtResult == VT_BSTR) lstrcpyW(szString, V_BSTR(&varresult));
memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
VariantClear(&varresult); VariantClear(&varresult);
return hr; return hr;
} }
...@@ -1059,8 +1056,7 @@ static HRESULT Installer_ProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute, LPW ...@@ -1059,8 +1056,7 @@ static HRESULT Installer_ProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute, LPW
V_BSTR(&vararg[0]) = SysAllocString(szAttribute); V_BSTR(&vararg[0]) = SysAllocString(szAttribute);
hr = invoke(pInstaller, "ProductInfo", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR); hr = invoke(pInstaller, "ProductInfo", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR);
if (V_BSTR(&varresult)) if (V_BSTR(&varresult)) lstrcpyW(szString, V_BSTR(&varresult));
memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
VariantClear(&varresult); VariantClear(&varresult);
return hr; return hr;
} }
...@@ -1099,8 +1095,7 @@ static HRESULT Installer_VersionGet(LPWSTR szVersion) ...@@ -1099,8 +1095,7 @@ static HRESULT Installer_VersionGet(LPWSTR szVersion)
HRESULT hr; HRESULT hr;
hr = invoke(pInstaller, "Version", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR); hr = invoke(pInstaller, "Version", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR);
if (V_BSTR(&varresult)) if (V_BSTR(&varresult)) lstrcpyW(szVersion, V_BSTR(&varresult));
memcpy(szVersion, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
VariantClear(&varresult); VariantClear(&varresult);
return hr; return hr;
} }
...@@ -1142,8 +1137,7 @@ static HRESULT Session_PropertyGet(IDispatch *pSession, LPCWSTR szName, LPWSTR s ...@@ -1142,8 +1137,7 @@ static HRESULT Session_PropertyGet(IDispatch *pSession, LPCWSTR szName, LPWSTR s
V_BSTR(&vararg[0]) = SysAllocString(szName); V_BSTR(&vararg[0]) = SysAllocString(szName);
hr = invoke(pSession, "Property", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR); hr = invoke(pSession, "Property", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR);
if (V_BSTR(&varresult)) if (V_BSTR(&varresult)) lstrcpyW(szReturn, V_BSTR(&varresult));
memcpy(szReturn, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
VariantClear(&varresult); VariantClear(&varresult);
return hr; return hr;
} }
...@@ -1442,8 +1436,7 @@ static HRESULT Record_StringDataGet(IDispatch *pRecord, int iField, LPWSTR szStr ...@@ -1442,8 +1436,7 @@ static HRESULT Record_StringDataGet(IDispatch *pRecord, int iField, LPWSTR szStr
V_I4(&vararg[0]) = iField; V_I4(&vararg[0]) = iField;
hr = invoke(pRecord, "StringData", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR); hr = invoke(pRecord, "StringData", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR);
if (V_BSTR(&varresult)) if (V_BSTR(&varresult)) lstrcpyW(szString, V_BSTR(&varresult));
memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
VariantClear(&varresult); VariantClear(&varresult);
return hr; return hr;
} }
...@@ -1520,8 +1513,7 @@ static HRESULT StringList_Item(IDispatch *pStringList, int iIndex, LPWSTR szStri ...@@ -1520,8 +1513,7 @@ static HRESULT StringList_Item(IDispatch *pStringList, int iIndex, LPWSTR szStri
V_I4(&vararg[0]) = iIndex; V_I4(&vararg[0]) = iIndex;
hr = invoke(pStringList, "Item", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR); hr = invoke(pStringList, "Item", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR);
if (V_BSTR(&varresult)) if (V_BSTR(&varresult)) lstrcpyW(szString, V_BSTR(&varresult));
memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
VariantClear(&varresult); VariantClear(&varresult);
return hr; return hr;
} }
......
...@@ -2186,18 +2186,10 @@ static void test_msiimport(void) ...@@ -2186,18 +2186,10 @@ static void test_msiimport(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
r = add_table_to_db(hdb, endlines1); r = add_table_to_db(hdb, endlines1);
if (r == ERROR_FUNCTION_FAILED) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
{
/* win9x doesn't handle this case */
skip("endlines not handled correctly.\n");
MsiCloseHandle(hdb);
DeleteFileA(msifile);
return;
}
r = add_table_to_db(hdb, endlines2); r = add_table_to_db(hdb, endlines2);
ok(r == ERROR_FUNCTION_FAILED, ok(r == ERROR_FUNCTION_FAILED, "Expected ERROR_FUNCTION_FAILED, got %d\n", r);
"Expected ERROR_FUNCTION_FAILED, got %d\n", r);
query = "SELECT * FROM `TestTable`"; query = "SELECT * FROM `TestTable`";
r = MsiDatabaseOpenView(hdb, query, &view); r = MsiDatabaseOpenView(hdb, query, &view);
...@@ -4984,7 +4976,6 @@ static void test_collation(void) ...@@ -4984,7 +4976,6 @@ static void test_collation(void)
static const WCHAR letter_D[] = {'D',0}; static const WCHAR letter_D[] = {'D',0};
static const WCHAR letter_a_ring[] = {'a',0x30a,0}; static const WCHAR letter_a_ring[] = {'a',0x30a,0};
static const WCHAR letter_a_with_ring[] = {0xe5,0}; static const WCHAR letter_a_with_ring[] = {0xe5,0};
static const WCHAR letter_a_broken[] = {'a',0xb0,0};
const char *query; const char *query;
MSIHANDLE hdb = 0, hview = 0, hrec = 0; MSIHANDLE hdb = 0, hview = 0, hrec = 0;
UINT r; UINT r;
...@@ -5063,8 +5054,7 @@ static void test_collation(void) ...@@ -5063,8 +5054,7 @@ static void test_collation(void)
sz = sizeof(bufferW) / sizeof(bufferW[0]); sz = sizeof(bufferW) / sizeof(bufferW[0]);
r = MsiRecordGetStringW(hrec, 1, bufferW, &sz); r = MsiRecordGetStringW(hrec, 1, bufferW, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!memcmp(bufferW, letter_a_ring, sizeof(letter_a_ring)) || ok(!memcmp(bufferW, letter_a_ring, sizeof(letter_a_ring)),
broken(!memcmp(bufferW, letter_a_broken, sizeof(letter_a_broken))) /* win9x */,
"Expected %s, got %s\n", wine_dbgstr_w(letter_a_ring), wine_dbgstr_w(bufferW)); "Expected %s, got %s\n", wine_dbgstr_w(letter_a_ring), wine_dbgstr_w(bufferW));
sz = sizeof(bufferW) / sizeof(bufferW[0]); sz = sizeof(bufferW) / sizeof(bufferW[0]);
r = MsiRecordGetStringW(hrec, 2, bufferW, &sz); r = MsiRecordGetStringW(hrec, 2, bufferW, &sz);
......
...@@ -55,7 +55,6 @@ static HMODULE hsrclient = 0; ...@@ -55,7 +55,6 @@ static HMODULE hsrclient = 0;
static BOOL (WINAPI *pSRRemoveRestorePoint)(DWORD); static BOOL (WINAPI *pSRRemoveRestorePoint)(DWORD);
static BOOL (WINAPI *pSRSetRestorePointA)(RESTOREPOINTINFOA*, STATEMGRSTATUS*); static BOOL (WINAPI *pSRSetRestorePointA)(RESTOREPOINTINFOA*, STATEMGRSTATUS*);
static BOOL on_win9x = FALSE;
static BOOL is_wow64; static BOOL is_wow64;
static const BOOL is_64bit = sizeof(void *) > sizeof(int); static const BOOL is_64bit = sizeof(void *) > sizeof(int);
...@@ -2088,19 +2087,6 @@ static BOOL is_process_limited(void) ...@@ -2088,19 +2087,6 @@ static BOOL is_process_limited(void)
return FALSE; return FALSE;
} }
static BOOL check_win9x(void)
{
SC_HANDLE scm;
scm = OpenSCManager(NULL, NULL, GENERIC_ALL);
if (!scm && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
return TRUE;
CloseServiceHandle(scm);
return FALSE;
}
static BOOL check_record(MSIHANDLE rec, UINT field, LPCSTR val) static BOOL check_record(MSIHANDLE rec, UINT field, LPCSTR val)
{ {
CHAR buffer[0x20]; CHAR buffer[0x20];
...@@ -2529,11 +2515,6 @@ static void test_MsiInstallProduct(void) ...@@ -2529,11 +2515,6 @@ static void test_MsiInstallProduct(void)
DWORD num, size, type; DWORD num, size, type;
REGSAM access = KEY_ALL_ACCESS; REGSAM access = KEY_ALL_ACCESS;
if (on_win9x)
{
win_skip("Services are not implemented on Win9x and WinMe\n");
return;
}
if (is_process_limited()) if (is_process_limited())
{ {
skip("process is limited\n"); skip("process is limited\n");
...@@ -3002,14 +2983,11 @@ static void test_continuouscabs(void) ...@@ -3002,14 +2983,11 @@ static void test_continuouscabs(void)
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
r = MsiInstallProductA(msifile, NULL); r = MsiInstallProductA(msifile, NULL);
if (r == ERROR_SUCCESS) /* win9x has a problem with this */ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
{ ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n");
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n"); ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n");
ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
ok(delete_pf("msitest", FALSE), "File not installed\n");
}
delete_cab_files(); delete_cab_files();
DeleteFile(msifile); DeleteFile(msifile);
...@@ -3176,14 +3154,11 @@ static void test_samesequence(void) ...@@ -3176,14 +3154,11 @@ static void test_samesequence(void)
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
r = MsiInstallProductA(msifile, NULL); r = MsiInstallProductA(msifile, NULL);
if (r == ERROR_SUCCESS) /* win9x has a problem with this */ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
{ ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n");
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n"); ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n");
ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
ok(delete_pf("msitest", FALSE), "File not installed\n");
}
delete_cab_files(); delete_cab_files();
DeleteFile(msifile); DeleteFile(msifile);
...@@ -3199,14 +3174,11 @@ static void test_uiLevelFlags(void) ...@@ -3199,14 +3174,11 @@ static void test_uiLevelFlags(void)
MsiSetInternalUI(INSTALLUILEVEL_NONE | INSTALLUILEVEL_SOURCERESONLY, NULL); MsiSetInternalUI(INSTALLUILEVEL_NONE | INSTALLUILEVEL_SOURCERESONLY, NULL);
r = MsiInstallProductA(msifile, NULL); r = MsiInstallProductA(msifile, NULL);
if (r == ERROR_SUCCESS) /* win9x has a problem with this */ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
{ ok(!delete_pf("msitest\\maximus", TRUE), "UI install occurred, but execute-only was requested.\n");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n");
ok(!delete_pf("msitest\\maximus", TRUE), "UI install occurred, but execute-only was requested.\n"); ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n");
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
ok(delete_pf("msitest", FALSE), "File not installed\n");
}
delete_cab_files(); delete_cab_files();
DeleteFile(msifile); DeleteFile(msifile);
...@@ -4172,14 +4144,9 @@ static void test_missingcab(void) ...@@ -4172,14 +4144,9 @@ static void test_missingcab(void)
skip("Not enough rights to perform tests\n"); skip("Not enough rights to perform tests\n");
goto error; goto error;
} }
ok(r == ERROR_SUCCESS || ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
broken(r == ERROR_INSTALL_FAILURE), /* win9x */ ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
"Expected ERROR_SUCCESS, got %u\n", r); ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
if (r == ERROR_SUCCESS)
{
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
}
ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n"); ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n");
ok(compare_pf_data("msitest\\tiberius", "abcdefgh", sizeof("abcdefgh")), "Wrong file contents\n"); ok(compare_pf_data("msitest\\tiberius", "abcdefgh", sizeof("abcdefgh")), "Wrong file contents\n");
ok(delete_pf("msitest\\tiberius", TRUE), "File not installed\n"); ok(delete_pf("msitest\\tiberius", TRUE), "File not installed\n");
...@@ -4790,11 +4757,6 @@ static void test_MsiConfigureProductEx(void) ...@@ -4790,11 +4757,6 @@ static void test_MsiConfigureProductEx(void)
CHAR keypath[MAX_PATH * 2], localpack[MAX_PATH]; CHAR keypath[MAX_PATH * 2], localpack[MAX_PATH];
REGSAM access = KEY_ALL_ACCESS; REGSAM access = KEY_ALL_ACCESS;
if (on_win9x)
{
win_skip("Different registry keys on Win9x and WinMe\n");
return;
}
if (is_process_limited()) if (is_process_limited())
{ {
skip("process is limited\n"); skip("process is limited\n");
...@@ -5578,31 +5540,7 @@ static void test_allusers_prop(void) ...@@ -5578,31 +5540,7 @@ static void test_allusers_prop(void)
/* ALLUSERS property set to 2, conditioned on ALLUSERS = 1 */ /* ALLUSERS property set to 2, conditioned on ALLUSERS = 1 */
r = MsiInstallProductA(msifile, "FULL=1"); r = MsiInstallProductA(msifile, "FULL=1");
if (r == ERROR_SUCCESS) ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
{
/* Win9x/WinMe */
win_skip("Win9x and WinMe act differently with respect to ALLUSERS\n");
ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n");
ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n");
ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
ok(delete_pf("msitest\\changed", FALSE), "File not installed\n");
ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
ok(delete_pf("msitest\\first", FALSE), "File not installed\n");
ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
ok(delete_pf("msitest\\one.txt", TRUE), "File installed\n");
ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
ok(delete_pf("msitest", FALSE), "File not installed\n");
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
delete_test_files();
}
else
ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
error: error:
delete_test_files(); delete_test_files();
...@@ -5707,11 +5645,6 @@ static void test_file_in_use(void) ...@@ -5707,11 +5645,6 @@ static void test_file_in_use(void)
HKEY hkey; HKEY hkey;
char path[MAX_PATH]; char path[MAX_PATH];
if (on_win9x)
{
win_skip("Pending file renaming is implemented differently on Win9x and WinMe\n");
return;
}
if (is_process_limited()) if (is_process_limited())
{ {
skip("process is limited\n"); skip("process is limited\n");
...@@ -5771,11 +5704,6 @@ static void test_file_in_use_cab(void) ...@@ -5771,11 +5704,6 @@ static void test_file_in_use_cab(void)
HKEY hkey; HKEY hkey;
char path[MAX_PATH]; char path[MAX_PATH];
if (on_win9x)
{
win_skip("Pending file renaming is implemented differently on Win9x and WinMe\n");
return;
}
if (is_process_limited()) if (is_process_limited())
{ {
skip("process is limited\n"); skip("process is limited\n");
...@@ -5996,7 +5924,7 @@ static void test_icon_table(void) ...@@ -5996,7 +5924,7 @@ static void test_icon_table(void)
MSIHANDLE hdb = 0, record; MSIHANDLE hdb = 0, record;
LPCSTR query; LPCSTR query;
UINT res; UINT res;
CHAR path[MAX_PATH], win9xpath[MAX_PATH]; CHAR path[MAX_PATH];
static const char prodcode[] = "{7DF88A49-996F-4EC8-A022-BF956F9B2CBB}"; static const char prodcode[] = "{7DF88A49-996F-4EC8-A022-BF956F9B2CBB}";
if (is_process_limited()) if (is_process_limited())
...@@ -6027,7 +5955,6 @@ static void test_icon_table(void) ...@@ -6027,7 +5955,6 @@ static void test_icon_table(void)
res = MsiCloseHandle(record); res = MsiCloseHandle(record);
ok(res == ERROR_SUCCESS, "Failed to close record handle: %d\n", res); ok(res == ERROR_SUCCESS, "Failed to close record handle: %d\n", res);
/* Delete the icon file after the handle is closed to make sure it's deleted on Win9x */
DeleteFileA("icon.ico"); DeleteFileA("icon.ico");
res = MsiDatabaseCommit(hdb); res = MsiDatabaseCommit(hdb);
ok(res == ERROR_SUCCESS, "Failed to commit database: %d\n", res); ok(res == ERROR_SUCCESS, "Failed to commit database: %d\n", res);
...@@ -6058,20 +5985,12 @@ static void test_icon_table(void) ...@@ -6058,20 +5985,12 @@ static void test_icon_table(void)
res = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1 ALLUSERS=1"); res = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1 ALLUSERS=1");
ok(res == ERROR_SUCCESS, "Failed to system-wide install: %d\n", res); ok(res == ERROR_SUCCESS, "Failed to system-wide install: %d\n", res);
/* win9x with MSI 2.0 installs the icon to a different folder, same as above */
lstrcpyA(win9xpath, APP_DATA_DIR);
lstrcatA(win9xpath, "\\");
lstrcatA(win9xpath, "Microsoft\\Installer\\");
lstrcatA(win9xpath, prodcode);
lstrcatA(win9xpath, "\\testicon");
lstrcpyA(path, WINDOWS_DIR); lstrcpyA(path, WINDOWS_DIR);
lstrcatA(path, "\\"); lstrcatA(path, "\\");
lstrcatA(path, "Installer\\"); lstrcatA(path, "Installer\\");
lstrcatA(path, prodcode); lstrcatA(path, prodcode);
lstrcatA(path, "\\testicon"); lstrcatA(path, "\\testicon");
ok(file_exists(path) || file_exists(win9xpath), ok(file_exists(path), "System-wide icon file isn't where it's expected (%s)\n", path);
"System-wide icon file isn't where it's expected (%s)\n", path);
res = MsiInstallProductA(msifile, "REMOVE=ALL"); res = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(res == ERROR_SUCCESS, "Failed to uninstall system-wide\n"); ok(res == ERROR_SUCCESS, "Failed to uninstall system-wide\n");
...@@ -6084,11 +6003,6 @@ static void test_sourcedir_props(void) ...@@ -6084,11 +6003,6 @@ static void test_sourcedir_props(void)
{ {
UINT r; UINT r;
if (on_win9x)
{
win_skip("skipping sourcedir tests on win9x\n");
return;
}
if (is_process_limited()) if (is_process_limited())
{ {
skip("process is limited\n"); skip("process is limited\n");
...@@ -6473,8 +6387,6 @@ START_TEST(install) ...@@ -6473,8 +6387,6 @@ START_TEST(install)
init_functionpointers(); init_functionpointers();
on_win9x = check_win9x();
if (pIsWow64Process) if (pIsWow64Process)
pIsWow64Process(GetCurrentProcess(), &is_wow64); pIsWow64Process(GetCurrentProcess(), &is_wow64);
......
...@@ -484,9 +484,7 @@ static void test_MsiGetFileHash(void) ...@@ -484,9 +484,7 @@ static void test_MsiGetFileHash(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ret = memcmp(&hash, &hash_data[i].hash, HASHSIZE); ret = memcmp(&hash, &hash_data[i].hash, HASHSIZE);
ok(ret == 0 || ok(!ret, "Hash incorrect\n");
broken(ret != 0), /* win95 */
"Hash incorrect\n");
DeleteFile(name); DeleteFile(name);
} }
......
...@@ -8754,12 +8754,6 @@ static void test_appsearch_reglocator(void) ...@@ -8754,12 +8754,6 @@ static void test_appsearch_reglocator(void)
if (S(U(si)).wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) if (S(U(si)).wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL)
{ {
size = ExpandEnvironmentStringsA("%PATH%", NULL, 0); size = ExpandEnvironmentStringsA("%PATH%", NULL, 0);
if (size == 0 && GetLastError() == ERROR_INVALID_PARAMETER)
{
/* Workaround for Win95 */
CHAR tempbuf[1];
size = ExpandEnvironmentStringsA("%PATH%", tempbuf, 0);
}
pathvar = HeapAlloc(GetProcessHeap(), 0, size); pathvar = HeapAlloc(GetProcessHeap(), 0, size);
ExpandEnvironmentStringsA("%PATH%", pathvar, size); ExpandEnvironmentStringsA("%PATH%", pathvar, size);
...@@ -10044,14 +10038,10 @@ static void test_installprops(void) ...@@ -10044,14 +10038,10 @@ static void test_installprops(void)
RegQueryValueEx(hkey2, "RegisteredOwner", NULL, &type, (LPBYTE)path, &size); RegQueryValueEx(hkey2, "RegisteredOwner", NULL, &type, (LPBYTE)path, &size);
} }
/* win9x doesn't set this */ size = MAX_PATH;
if (*path) r = MsiGetProperty(hpkg, "USERNAME", buf, &size);
{ ok( r == ERROR_SUCCESS, "failed to get property: %d\n", r);
size = MAX_PATH; ok( !lstrcmp(buf, path), "Expected %s, got %s\n", path, buf);
r = MsiGetProperty(hpkg, "USERNAME", buf, &size);
ok( r == ERROR_SUCCESS, "failed to get property: %d\n", r);
ok( !lstrcmp(buf, path), "Expected %s, got %s\n", path, buf);
}
size = MAX_PATH; size = MAX_PATH;
type = REG_SZ; type = REG_SZ;
...@@ -12304,9 +12294,7 @@ static void _test_file_access(LPCSTR file, const struct access_res *ares, DWORD ...@@ -12304,9 +12294,7 @@ static void _test_file_access(LPCSTR file, const struct access_res *ares, DWORD
line, idx, ares[idx].gothandle, line, idx, ares[idx].gothandle,
(hfile != INVALID_HANDLE_VALUE)); (hfile != INVALID_HANDLE_VALUE));
ok(lasterr == ares[idx].lasterr || ok(lasterr == ares[idx].lasterr, "(%d, lasterr, %d): Expected %d, got %d\n",
lasterr == 0xdeadbeef, /* win9x */
"(%d, lasterr, %d): Expected %d, got %d\n",
line, idx, ares[idx].lasterr, lasterr); line, idx, ares[idx].lasterr, lasterr);
CloseHandle(hfile); CloseHandle(hfile);
...@@ -12529,17 +12517,8 @@ static void test_MsiGetProductProperty(void) ...@@ -12529,17 +12517,8 @@ static void test_MsiGetProductProperty(void)
DWORD size; DWORD size;
LONG res; LONG res;
UINT r; UINT r;
SC_HANDLE scm;
REGSAM access = KEY_ALL_ACCESS; REGSAM access = KEY_ALL_ACCESS;
scm = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT);
if (!scm && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
{
win_skip("Different registry keys on Win9x and WinMe\n");
return;
}
CloseServiceHandle(scm);
GetCurrentDirectoryA(MAX_PATH, path); GetCurrentDirectoryA(MAX_PATH, path);
lstrcatA(path, "\\"); lstrcatA(path, "\\");
......
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