Commit 669122fd authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Fix a few test failures on win9x.

parent c1e3f831
...@@ -922,10 +922,12 @@ static void test_settargetpath(void) ...@@ -922,10 +922,12 @@ static void test_settargetpath(void)
sprintf( tempdir, "%s\\subdir", buffer ); sprintf( tempdir, "%s\\subdir", buffer );
r = MsiSetTargetPath( hpkg, "TARGETDIR", buffer ); r = MsiSetTargetPath( hpkg, "TARGETDIR", buffer );
ok( r == ERROR_SUCCESS, "MsiSetTargetPath on file returned %d\n", r ); ok( r == ERROR_SUCCESS || r == ERROR_DIRECTORY,
"MsiSetTargetPath on file returned %d\n", r );
r = MsiSetTargetPath( hpkg, "TARGETDIR", tempdir ); r = MsiSetTargetPath( hpkg, "TARGETDIR", tempdir );
ok( r == ERROR_SUCCESS, "MsiSetTargetPath on 'subdir' of file returned %d\n", r ); ok( r == ERROR_SUCCESS || r == ERROR_DIRECTORY,
"MsiSetTargetPath on 'subdir' of file returned %d\n", r );
DeleteFile( buffer ); DeleteFile( buffer );
...@@ -4731,6 +4733,7 @@ static void test_installprops(void) ...@@ -4731,6 +4733,7 @@ static void test_installprops(void)
size = MAX_PATH; size = MAX_PATH;
type = REG_SZ; type = REG_SZ;
*path = '\0';
if (RegQueryValueEx(hkey1, "DefName", NULL, &type, (LPBYTE)path, &size) != ERROR_SUCCESS) if (RegQueryValueEx(hkey1, "DefName", NULL, &type, (LPBYTE)path, &size) != ERROR_SUCCESS)
{ {
size = MAX_PATH; size = MAX_PATH;
...@@ -4738,13 +4741,18 @@ static void test_installprops(void) ...@@ -4738,13 +4741,18 @@ static void test_installprops(void)
RegQueryValueEx(hkey2, "RegisteredOwner", NULL, &type, (LPBYTE)path, &size); RegQueryValueEx(hkey2, "RegisteredOwner", NULL, &type, (LPBYTE)path, &size);
} }
size = MAX_PATH; /* win9x doesn't set this */
r = MsiGetProperty(hpkg, "USERNAME", buf, &size); if (*path)
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;
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;
*path = '\0';
if (RegQueryValueEx(hkey1, "DefCompany", NULL, &type, (LPBYTE)path, &size) != ERROR_SUCCESS) if (RegQueryValueEx(hkey1, "DefCompany", NULL, &type, (LPBYTE)path, &size) != ERROR_SUCCESS)
{ {
size = MAX_PATH; size = MAX_PATH;
...@@ -4752,10 +4760,13 @@ static void test_installprops(void) ...@@ -4752,10 +4760,13 @@ static void test_installprops(void)
RegQueryValueEx(hkey2, "RegisteredOrganization", NULL, &type, (LPBYTE)path, &size); RegQueryValueEx(hkey2, "RegisteredOrganization", NULL, &type, (LPBYTE)path, &size);
} }
size = MAX_PATH; if (*path)
r = MsiGetProperty(hpkg, "COMPANYNAME", 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, "COMPANYNAME", 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;
r = MsiGetProperty(hpkg, "VersionDatabase", buf, &size); r = MsiGetProperty(hpkg, "VersionDatabase", buf, &size);
......
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