Author: akhaldi
Date: Mon Feb 6 20:43:38 2012
New Revision: 55470
URL:
http://svn.reactos.org/svn/reactos?rev=55470&view=rev
Log:
[MSI_WINETEST]
* Sync to Wine 1.3.37. This partially reverts r55047.
Modified:
trunk/rostests/winetests/msi/automation.c
trunk/rostests/winetests/msi/package.c
Modified: trunk/rostests/winetests/msi/automation.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/automation.…
==============================================================================
--- trunk/rostests/winetests/msi/automation.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/automation.c [iso-8859-1] Mon Feb 6 20:43:38 2012
@@ -489,79 +489,113 @@
return id;
}
-typedef struct {
- DISPID did;
- const char *name;
- BOOL todo;
-} get_did_t;
-
-static const get_did_t get_did_data[] = {
- { 1, "CreateRecord" },
- { 2, "OpenPackage" },
- { 3, "OpenProduct" },
- { 4, "OpenDatabase" },
- { 5, "SummaryInformation" },
- { 6, "UILevel" },
- { 7, "EnableLog" },
- { 8, "InstallProduct" },
- { 9, "Version" },
- { 10, "LastErrorRecord" },
- { 11, "RegistryValue" },
- { 12, "Environment" },
- { 13, "FileAttributes" },
- { 15, "FileSize" },
- { 16, "FileVersion" },
- { 17, "ProductState" },
- { 18, "ProductInfo" },
- { 19, "ConfigureProduct", TRUE },
- { 20, "ReinstallProduct", TRUE },
- { 21, "CollectUserInfo", TRUE },
- { 22, "ApplyPatch", TRUE },
- { 23, "FeatureParent", TRUE },
- { 24, "FeatureState", TRUE },
- { 25, "UseFeature", TRUE },
- { 26, "FeatureUsageCount", TRUE },
- { 27, "FeatureUsageDate", TRUE },
- { 28, "ConfigureFeature", TRUE },
- { 29, "ReinstallFeature", TRUE },
- { 30, "ProvideComponent", TRUE },
- { 31, "ComponentPath", TRUE },
- { 32, "ProvideQualifiedComponent", TRUE },
- { 33, "QualifierDescription", TRUE },
- { 34, "ComponentQualifiers", TRUE },
- { 35, "Products" },
- { 36, "Features", TRUE },
- { 37, "Components", TRUE },
- { 38, "ComponentClients", TRUE },
- { 39, "Patches", TRUE },
- { 40, "RelatedProducts" },
- { 41, "PatchInfo", TRUE },
- { 42, "PatchTransforms", TRUE },
- { 43, "AddSource", TRUE },
- { 44, "ClearSourceList", TRUE },
- { 45, "ForceSourceListResolution", TRUE },
- { 46, "ShortcutTarget", TRUE },
- { 47, "FileHash", TRUE },
- { 48, "FileSignatureInfo", TRUE },
- { 0 }
-};
-
static void test_dispid(void)
{
- const get_did_t *ptr = get_did_data;
DISPID dispid;
- while (ptr->name)
+ dispid = get_dispid(pInstaller, "CreateRecord");
+ ok(dispid == 1, "Expected 1, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "OpenPackage");
+ ok(dispid == 2, "Expected 2, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "OpenProduct");
+ ok(dispid == 3, "Expected 3, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "OpenDatabase");
+ ok(dispid == 4, "Expected 4, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "SummaryInformation");
+ ok(dispid == 5, "Expected 5, got %d\n", dispid);
+ dispid = get_dispid( pInstaller, "UILevel" );
+ ok(dispid == 6, "Expected 6, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "EnableLog");
+ ok(dispid == 7, "Expected 7, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "InstallProduct");
+ ok(dispid == 8, "Expected 8, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "Version");
+ ok(dispid == 9, "Expected 9, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "LastErrorRecord");
+ ok(dispid == 10, "Expected 10, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "RegistryValue");
+ ok(dispid == 11, "Expected 11, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "Environment");
+ ok(dispid == 12, "Expected 12, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "FileAttributes");
+ ok(dispid == 13, "Expected 13, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "FileSize");
+ ok(dispid == 15, "Expected 15, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "FileVersion");
+ ok(dispid == 16, "Expected 16, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ProductState");
+ ok(dispid == 17, "Expected 17, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ProductInfo");
+ ok(dispid == 18, "Expected 18, got %d\n", dispid);
+ todo_wine
{
- dispid = get_dispid(pInstaller, ptr->name);
- if (ptr->todo)
- todo_wine
- ok(dispid == ptr->did, "%s: expected %d, got %d\n",
ptr->name, ptr->did, dispid);
- else
- ok(dispid == ptr->did, "%s: expected %d, got %d\n",
ptr->name, ptr->did, dispid);
- ptr++;
- }
-
+ dispid = get_dispid(pInstaller, "ConfigureProduct");
+ ok(dispid == 19, "Expected 19, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ReinstallProduct");
+ ok(dispid == 20 , "Expected 20, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "CollectUserInfo");
+ ok(dispid == 21, "Expected 21, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ApplyPatch");
+ ok(dispid == 22, "Expected 22, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "FeatureParent");
+ ok(dispid == 23, "Expected 23, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "FeatureState");
+ ok(dispid == 24, "Expected 24, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "UseFeature");
+ ok(dispid == 25, "Expected 25, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "FeatureUsageCount");
+ ok(dispid == 26, "Expected 26, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "FeatureUsageDate");
+ ok(dispid == 27, "Expected 27, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ConfigureFeature");
+ ok(dispid == 28, "Expected 28, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ReinstallFeature");
+ ok(dispid == 29, "Expected 29, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ProvideComponent");
+ ok(dispid == 30, "Expected 30, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ComponentPath");
+ ok(dispid == 31, "Expected 31, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ProvideQualifiedComponent");
+ ok(dispid == 32, "Expected 32, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "QualifierDescription");
+ ok(dispid == 33, "Expected 33, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ComponentQualifiers");
+ ok(dispid == 34, "Expected 34, got %d\n", dispid);
+ }
+ dispid = get_dispid(pInstaller, "Products");
+ ok(dispid == 35, "Expected 35, got %d\n", dispid);
+ todo_wine
+ {
+ dispid = get_dispid(pInstaller, "Features");
+ ok(dispid == 36, "Expected 36, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "Components");
+ ok(dispid == 37, "Expected 37, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ComponentClients");
+ ok(dispid == 38, "Expected 38, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "Patches");
+ ok(dispid == 39, "Expected 39, got %d\n", dispid);
+ }
+ dispid = get_dispid(pInstaller, "RelatedProducts");
+ ok(dispid == 40, "Expected 40, got %d\n", dispid);
+ todo_wine
+ {
+ dispid = get_dispid(pInstaller, "PatchInfo");
+ ok(dispid == 41, "Expected 41, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "PatchTransforms");
+ ok(dispid == 42, "Expected 42, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "AddSource");
+ ok(dispid == 43, "Expected 43, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ClearSourceList");
+ ok(dispid == 44, "Expected 44, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ForceSourceListResolution");
+ ok(dispid == 45, "Expected 45, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "ShortcutTarget");
+ ok(dispid == 46, "Expected 46, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "FileHash");
+ ok(dispid == 47, "Expected 47, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "FileSignatureInfo");
+ ok(dispid == 48, "Expected 48, got %d\n", dispid);
+ }
dispid = get_dispid(pInstaller, "RemovePatches");
ok(dispid == 49 || dispid == -1, "Expected 49 or -1, got %d\n", dispid);
dispid = get_dispid(pInstaller, "ApplyMultiplePatches");
Modified: trunk/rostests/winetests/msi/package.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/package.c?r…
==============================================================================
--- trunk/rostests/winetests/msi/package.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/package.c [iso-8859-1] Mon Feb 6 20:43:38 2012
@@ -1134,7 +1134,6 @@
r = MsiSetTargetPath( hpkg, "TARGETDIR", tempdir );
ok( r == ERROR_SUCCESS, "MsiSetTargetPath on subsubdir returned %d\n", r
);
- buffer[0] = 0;
sz = sizeof buffer - 1;
lstrcat( tempdir, "\\" );
r = MsiGetTargetPath( hpkg, "TARGETDIR", buffer, &sz );
@@ -1145,7 +1144,6 @@
query_file_path( hpkg, "[#RootFile]", buffer );
ok( !lstrcmp(buffer, file), "Expected %s, got %s\n", file, buffer);
- buffer[0] = 0;
sz = sizeof(buffer);
r = MsiGetPropertyA( hpkg, "TestParent", buffer, &sz );
ok( r == ERROR_SUCCESS, "MsiGetProperty returned %u\n", r );
@@ -1155,19 +1153,16 @@
r = MsiSetTargetPath( hpkg, "TestParent", "C:\\one\\two" );
ok( r == ERROR_SUCCESS, "MsiSetTargetPath returned %d\n", r );
- buffer[0] = 0;
sz = sizeof(buffer);
r = MsiGetPropertyA( hpkg, "TestParent", buffer, &sz );
ok( r == ERROR_SUCCESS, "MsiGetProperty returned %u\n", r );
ok( lstrcmpi(buffer, "C:\\one\\two\\TestDir\\"),
"Expected \"C:\\one\\two\\TestDir\\\", got
\"%s\"\n", buffer );
- buffer[0] = 0;
query_file_path( hpkg, "[#TestFile]", buffer );
ok( !lstrcmpi(buffer, "C:\\one\\two\\TestDir\\testfile.txt"),
"Expected C:\\one\\two\\TestDir\\testfile.txt, got %s\n", buffer );
- buffer[0] = 0;
sz = sizeof buffer - 1;
r = MsiGetTargetPath( hpkg, "TestParent", buffer, &sz );
ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r);
@@ -1176,7 +1171,6 @@
r = MsiSetTargetPath( hpkg, "TestParent", "C:\\one\\two\\three"
);
ok( r == ERROR_SUCCESS, "MsiSetTargetPath returned %d\n", r );
- buffer[0] = 0;
sz = sizeof buffer - 1;
r = MsiGetTargetPath( hpkg, "TestParent", buffer, &sz );
ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r);
@@ -1185,20 +1179,10 @@
r = MsiSetTargetPath( hpkg, "TestParent", "C:\\\\one\\\\two "
);
ok( r == ERROR_SUCCESS, "MsiSetTargetPath returned %d\n", r );
- buffer[0] = 0;
sz = sizeof buffer - 1;
r = MsiGetTargetPath( hpkg, "TestParent", buffer, &sz );
ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r);
ok( !lstrcmpi(buffer, "C:\\one\\two\\"), "Expected
\"C:\\one\\two\\\", got %s\n", buffer);
-
- r = MsiSetTargetPath( hpkg, "TestParent", "C:\\\\ Program Files \\\\
" );
- ok( r == ERROR_SUCCESS, "MsiSetTargetPath returned %d\n", r );
-
- buffer[0] = 0;
- sz = sizeof buffer - 1;
- r = MsiGetTargetPath( hpkg, "TestParent", buffer, &sz );
- ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r);
- ok( !lstrcmpi(buffer, "C:\\Program Files\\"), "Expected
\"C:\\Program Files\\\", got %s\n", buffer);
MsiCloseHandle( hpkg );
}
@@ -10988,17 +10972,13 @@
/* source path does not exist, but the property exists */
size = MAX_PATH;
lstrcpyA(path, "kiwi");
- r = MsiGetProperty(hpkg, "SourceDir", path, &size);
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
-
- size = MAX_PATH;
- lstrcpyA(path, "kiwi");
r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ todo_wine
+ {
+ ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
+ ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd),
size);
+ }
/* try SubDir after CostInitialize */
size = MAX_PATH;
@@ -11047,13 +11027,6 @@
/* source path does not exist, but the property exists */
size = MAX_PATH;
lstrcpyA(path, "kiwi");
- r = MsiGetProperty(hpkg, "SourceDir", path, &size);
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
-
- size = MAX_PATH;
- lstrcpyA(path, "kiwi");
r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
@@ -11106,13 +11079,6 @@
/* source path does not exist, but the property exists */
size = MAX_PATH;
lstrcpyA(path, "kiwi");
- r = MsiGetProperty(hpkg, "SourceDir", path, &size);
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
-
- size = MAX_PATH;
- lstrcpyA(path, "kiwi");
r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
@@ -11163,13 +11129,6 @@
ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
/* source path does not exist, but the property exists */
- size = MAX_PATH;
- lstrcpyA(path, "kiwi");
- r = MsiGetProperty(hpkg, "SourceDir", path, &size);
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
-
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size);
@@ -11309,13 +11268,6 @@
/* source path nor the property exist */
size = MAX_PATH;
lstrcpyA(path, "kiwi");
- r = MsiGetProperty(hpkg, "SourceDir", path, &size);
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(path, ""), "Expected \"\", got
\"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
-
- size = MAX_PATH;
- lstrcpyA(path, "kiwi");
r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got
\"%s\"\n", path);
@@ -11372,17 +11324,13 @@
/* source path does not exist, but the property exists */
size = MAX_PATH;
lstrcpyA(path, "kiwi");
- r = MsiGetProperty(hpkg, "SourceDir", path, &size);
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
-
- size = MAX_PATH;
- lstrcpyA(path, "kiwi");
r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ todo_wine
+ {
+ ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
+ ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd),
size);
+ }
/* try SubDir after CostInitialize */
size = MAX_PATH;
@@ -11433,13 +11381,6 @@
/* source path and the property exist */
size = MAX_PATH;
lstrcpyA(path, "kiwi");
- r = MsiGetProperty(hpkg, "SourceDir", path, &size);
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
-
- size = MAX_PATH;
- lstrcpyA(path, "kiwi");
r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
@@ -11494,13 +11435,6 @@
/* source path and the property exist */
size = MAX_PATH;
lstrcpyA(path, "kiwi");
- r = MsiGetProperty(hpkg, "SourceDir", path, &size);
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
-
- size = MAX_PATH;
- lstrcpyA(path, "kiwi");
r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
@@ -11553,13 +11487,6 @@
}
/* source path and the property exist */
- size = MAX_PATH;
- lstrcpyA(path, "kiwi");
- r = MsiGetProperty(hpkg, "SourceDir", path, &size);
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(path, cwd), "Expected \"%s\", got
\"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
-
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size);