Author: cwittich
Date: Mon Nov 16 02:15:54 2009
New Revision: 44192
URL:
http://svn.reactos.org/svn/reactos?rev=44192&view=rev
Log:
sync msi winetest to wine 1.1.33
Modified:
trunk/rostests/winetests/msi/db.c
trunk/rostests/winetests/msi/install.c
trunk/rostests/winetests/msi/msi.c
trunk/rostests/winetests/msi/source.c
Modified: trunk/rostests/winetests/msi/db.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/db.c?rev=44…
==============================================================================
--- trunk/rostests/winetests/msi/db.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/db.c [iso-8859-1] Mon Nov 16 02:15:54 2009
@@ -1565,6 +1565,101 @@
DeleteFile( msifile );
}
+
+static void test_where_not_in_selected(void)
+{
+ MSIHANDLE hdb = 0, rec, view;
+ LPCSTR query;
+ UINT r;
+
+ hdb = create_db();
+ ok( hdb, "failed to create db\n");
+
+ r = run_query(hdb, 0,
+ "CREATE TABLE `IESTable` ("
+ "`Action` CHAR(64), "
+ "`Condition` CHAR(64), "
+ "`Sequence` LONG PRIMARY KEY `Sequence`)");
+ ok( r == S_OK, "Cannot create IESTable table: %d\n", r);
+
+ r = run_query(hdb, 0,
+ "CREATE TABLE `CATable` ("
+ "`Action` CHAR(64), "
+ "`Type` LONG PRIMARY KEY `Type`)");
+ ok( r == S_OK, "Cannot create CATable table: %d\n", r);
+
+ r = run_query(hdb, 0, "INSERT INTO `IESTable` "
+ "( `Action`, `Condition`, `Sequence`) "
+ "VALUES ( 'clean', 'cond4', 4)");
+ ok( r == S_OK, "cannot add entry to IESTable table:%d\n", r );
+
+ r = run_query(hdb, 0, "INSERT INTO `IESTable` "
+ "( `Action`, `Condition`, `Sequence`) "
+ "VALUES ( 'depends', 'cond1', 1)");
+ ok( r == S_OK, "cannot add entry to IESTable table:%d\n", r );
+
+ r = run_query(hdb, 0, "INSERT INTO `IESTable` "
+ "( `Action`, `Condition`, `Sequence`) "
+ "VALUES ( 'build', 'cond2', 2)");
+ ok( r == S_OK, "cannot add entry to IESTable table:%d\n", r );
+
+ r = run_query(hdb, 0, "INSERT INTO `IESTable` "
+ "( `Action`, `Condition`, `Sequence`) "
+ "VALUES ( 'build2', 'cond6', 6)");
+ ok( r == S_OK, "cannot add entry to IESTable table:%d\n", r );
+
+ r = run_query(hdb, 0, "INSERT INTO `IESTable` "
+ "( `Action`, `Condition`, `Sequence`) "
+ "VALUES ( 'build', 'cond3', 3)");
+ ok(r == S_OK, "cannot add entry to IESTable table:%d\n", r );
+
+ r = run_query(hdb, 0, "INSERT INTO `CATable` "
+ "( `Action`, `Type` ) "
+ "VALUES ( 'build', 32)");
+ ok(r == S_OK, "cannot add entry to CATable table:%d\n", r );
+
+ r = run_query(hdb, 0, "INSERT INTO `CATable` "
+ "( `Action`, `Type` ) "
+ "VALUES ( 'depends', 64)");
+ ok(r == S_OK, "cannot add entry to CATable table:%d\n", r );
+
+ r = run_query(hdb, 0, "INSERT INTO `CATable` "
+ "( `Action`, `Type` ) "
+ "VALUES ( 'clean', 63)");
+ ok(r == S_OK, "cannot add entry to CATable table:%d\n", r );
+
+ r = run_query(hdb, 0, "INSERT INTO `CATable` "
+ "( `Action`, `Type` ) "
+ "VALUES ( 'build2', 34)");
+ ok(r == S_OK, "cannot add entry to CATable table:%d\n", r );
+ query = "Select IESTable.Condition from CATable, IESTable where "
+ "CATable.Action = IESTable.Action and CATable.Type = 32";
+ r = MsiDatabaseOpenView(hdb, query, &view);
+ ok( r == ERROR_SUCCESS, "failed to open view: %d\n", r );
+
+ r = MsiViewExecute(view, 0);
+ ok( r == ERROR_SUCCESS, "failed to execute view: %d\n", r );
+
+ r = MsiViewFetch(view, &rec);
+ ok( r == ERROR_SUCCESS, "failed to fetch view: %d\n", r );
+
+ ok( check_record( rec, 1, "cond2"), "wrong condition\n");
+
+ MsiCloseHandle( rec );
+ r = MsiViewFetch(view, &rec);
+ ok( r == ERROR_SUCCESS, "failed to fetch view: %d\n", r );
+
+ ok( check_record( rec, 1, "cond3"), "wrong condition\n");
+
+ MsiCloseHandle( rec );
+ MsiViewClose(view);
+ MsiCloseHandle(view);
+
+ MsiCloseHandle( hdb );
+ DeleteFile(msifile);
+
+}
+
static void test_where(void)
{
@@ -8450,6 +8545,7 @@
test_longstrings();
test_streamtable();
test_binary();
+ test_where_not_in_selected();
test_where();
test_msiimport();
test_binary_import();
Modified: trunk/rostests/winetests/msi/install.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/install.c?r…
==============================================================================
--- trunk/rostests/winetests/msi/install.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/install.c [iso-8859-1] Mon Nov 16 02:15:54 2009
@@ -35,6 +35,8 @@
static UINT (WINAPI *pMsiQueryComponentStateA)
(LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, INSTALLSTATE*);
+static UINT (WINAPI *pMsiSetExternalUIRecord)
+ (INSTALLUI_HANDLER_RECORD, DWORD, LPVOID, PINSTALLUI_HANDLER_RECORD);
static UINT (WINAPI *pMsiSourceListEnumSourcesA)
(LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPSTR, LPDWORD);
static UINT (WINAPI *pMsiSourceListGetInfoA)
@@ -172,7 +174,13 @@
"Var1\t=-MSITESTVAR1\t1\tOne\n"
"Var2\tMSITESTVAR2\t1\tOne\n"
"Var3\t=-MSITESTVAR3\t1\tOne\n"
- "Var4\tMSITESTVAR4\t1\tOne\n";
+ "Var4\tMSITESTVAR4\t1\tOne\n"
+ "Var5\t-MSITESTVAR5\t\tOne\n"
+ "Var6\tMSITESTVAR6\t\tOne\n"
+ "Var7\t!-MSITESTVAR7\t\tOne\n"
+ "Var8\t!-*MSITESTVAR8\t\tOne\n"
+ "Var9\t=-MSITESTVAR9\t\tOne\n"
+ "Var10\t=MSITESTVAR10\t\tOne\n";
static const CHAR condition_dat[] = "Feature_\tLevel\tCondition\n"
"s38\ti2\tS255\n"
@@ -1684,6 +1692,7 @@
trace("GetProcAddress(%s) failed\n", #func);
GET_PROC(hmsi, MsiQueryComponentStateA);
+ GET_PROC(hmsi, MsiSetExternalUIRecord);
GET_PROC(hmsi, MsiSourceListEnumSourcesA);
GET_PROC(hmsi, MsiSourceListGetInfoA);
@@ -3944,6 +3953,7 @@
DeleteFile(msifile);
DeleteFile("msitest\\maximus");
RemoveDirectory("msitest");
+ LocalFree(usersid);
}
static void test_publish_processcomponents(void)
@@ -4068,6 +4078,7 @@
DeleteFile(msifile);
DeleteFile("msitest\\maximus");
RemoveDirectory("msitest");
+ LocalFree(usersid);
}
static void test_publish(void)
@@ -6605,6 +6616,24 @@
res = RegDeleteValueA(env, "MSITESTVAR4");
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ res = RegDeleteValueA(env, "MSITESTVAR5");
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n",
res);
+
+ res = RegDeleteValueA(env, "MSITESTVAR6");
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n",
res);
+
+ res = RegDeleteValueA(env, "MSITESTVAR7");
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n",
res);
+
+ res = RegDeleteValueA(env, "MSITESTVAR8");
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n",
res);
+
+ res = RegDeleteValueA(env, "MSITESTVAR9");
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n",
res);
+
+ res = RegDeleteValueA(env, "MSITESTVAR10");
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n",
res);
+
RegCloseKey(env);
delete_pf("msitest\\cabout\\new\\five.txt", TRUE);
@@ -6867,6 +6896,84 @@
delete_cab_files();
delete_test_files();
+}
+
+static INT CALLBACK handler_a(LPVOID context, UINT type, LPCSTR msg)
+{
+ return IDOK;
+}
+
+static INT CALLBACK handler_w(LPVOID context, UINT type, LPCWSTR msg)
+{
+ return IDOK;
+}
+
+static INT CALLBACK handler_record(LPVOID context, UINT type, MSIHANDLE record)
+{
+ return IDOK;
+}
+
+static void test_MsiSetExternalUI(void)
+{
+ INSTALLUI_HANDLERA ret_a;
+ INSTALLUI_HANDLERW ret_w;
+ INSTALLUI_HANDLER_RECORD prev;
+ UINT error;
+
+ ret_a = MsiSetExternalUIA(handler_a, INSTALLLOGMODE_ERROR, NULL);
+ ok(ret_a == NULL, "expected NULL, got %p\n", ret_a);
+
+ ret_a = MsiSetExternalUIA(NULL, 0, NULL);
+ ok(ret_a == handler_a, "expected %p, got %p\n", handler_a, ret_a);
+
+ /* Not present before Installer 3.1 */
+ if (!pMsiSetExternalUIRecord) {
+ win_skip("MsiSetExternalUIRecord is not available\n");
+ return;
+ }
+
+ error = pMsiSetExternalUIRecord(handler_record, INSTALLLOGMODE_ERROR, NULL,
&prev);
+ ok(!error, "MsiSetExternalUIRecord failed %u\n", error);
+ ok(prev == NULL, "expected NULL, got %p\n", prev);
+
+ prev = (INSTALLUI_HANDLER_RECORD)0xdeadbeef;
+ error = pMsiSetExternalUIRecord(NULL, INSTALLLOGMODE_ERROR, NULL, &prev);
+ ok(!error, "MsiSetExternalUIRecord failed %u\n", error);
+ ok(prev == handler_record, "expected %p, got %p\n", handler_record, prev);
+
+ ret_w = MsiSetExternalUIW(handler_w, INSTALLLOGMODE_ERROR, NULL);
+ ok(ret_w == NULL, "expected NULL, got %p\n", ret_w);
+
+ ret_w = MsiSetExternalUIW(NULL, 0, NULL);
+ ok(ret_w == handler_w, "expected %p, got %p\n", handler_w, ret_w);
+
+ ret_a = MsiSetExternalUIA(handler_a, INSTALLLOGMODE_ERROR, NULL);
+ ok(ret_a == NULL, "expected NULL, got %p\n", ret_a);
+
+ ret_w = MsiSetExternalUIW(handler_w, INSTALLLOGMODE_ERROR, NULL);
+ ok(ret_w == NULL, "expected NULL, got %p\n", ret_w);
+
+ prev = (INSTALLUI_HANDLER_RECORD)0xdeadbeef;
+ error = pMsiSetExternalUIRecord(handler_record, INSTALLLOGMODE_ERROR, NULL,
&prev);
+ ok(!error, "MsiSetExternalUIRecord failed %u\n", error);
+ ok(prev == NULL, "expected NULL, got %p\n", prev);
+
+ ret_a = MsiSetExternalUIA(NULL, 0, NULL);
+ ok(ret_a == NULL, "expected NULL, got %p\n", ret_a);
+
+ ret_w = MsiSetExternalUIW(NULL, 0, NULL);
+ ok(ret_w == NULL, "expected NULL, got %p\n", ret_w);
+
+ prev = (INSTALLUI_HANDLER_RECORD)0xdeadbeef;
+ error = pMsiSetExternalUIRecord(NULL, 0, NULL, &prev);
+ ok(!error, "MsiSetExternalUIRecord failed %u\n", error);
+ ok(prev == handler_record, "expected %p, got %p\n", handler_record, prev);
+
+ error = pMsiSetExternalUIRecord(handler_record, INSTALLLOGMODE_ERROR, NULL, NULL);
+ ok(!error, "MsiSetExternalUIRecord failed %u\n", error);
+
+ error = pMsiSetExternalUIRecord(NULL, 0, NULL, NULL);
+ ok(!error, "MsiSetExternalUIRecord failed %u\n", error);
}
START_TEST(install)
@@ -6957,6 +7064,7 @@
test_installed_prop();
test_file_in_use();
test_file_in_use_cab();
+ test_MsiSetExternalUI();
DeleteFileA(log_file);
Modified: trunk/rostests/winetests/msi/msi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/msi.c?rev=4…
==============================================================================
--- trunk/rostests/winetests/msi/msi.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/msi.c [iso-8859-1] Mon Nov 16 02:15:54 2009
@@ -1201,6 +1201,7 @@
RegCloseKey(compkey2);
RegCloseKey(localkey);
RegCloseKey(userkey);
+ LocalFree(usersid);
}
static void test_MsiQueryComponentState(void)
@@ -1520,6 +1521,7 @@
RegDeleteKeyA(compkey, "");
RegCloseKey(prodkey);
RegCloseKey(compkey);
+ LocalFree(usersid);
}
static void test_MsiGetComponentPath(void)
@@ -1872,6 +1874,7 @@
RegCloseKey(prodkey);
RegCloseKey(compkey);
DeleteFileA("C:\\imapath");
+ LocalFree(usersid);
}
static void test_MsiGetProductCode(void)
@@ -2128,6 +2131,7 @@
RegDeleteValueA(compkey, prod2_squashed);
RegDeleteKeyA(compkey, "");
RegCloseKey(compkey);
+ LocalFree(usersid);
}
static void test_MsiEnumClients(void)
@@ -2314,6 +2318,7 @@
RegDeleteValueA(compkey, prod2_squashed);
RegDeleteKeyA(compkey, "");
RegCloseKey(compkey);
+ LocalFree(usersid);
}
static void get_version_info(LPSTR path, LPSTR *vercheck, LPDWORD verchecksz,
@@ -3845,6 +3850,7 @@
RegCloseKey(localkey);
RegCloseKey(source);
RegCloseKey(prodkey);
+ LocalFree(usersid);
}
static void test_MsiGetProductInfoEx(void)
@@ -6582,6 +6588,7 @@
RegDeleteValueA(prodkey, "HelpLink");
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
+ LocalFree(usersid);
}
#define INIT_USERINFO() \
@@ -7161,6 +7168,7 @@
RegCloseKey(userprod);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
+ LocalFree(usersid);
}
static void test_MsiOpenProduct(void)
@@ -7473,6 +7481,7 @@
RegCloseKey(prodkey);
DeleteFileA(msifile);
+ LocalFree(usersid);
}
static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid)
@@ -9201,6 +9210,7 @@
test_MsiEnumPatchesEx_userunmanaged(NULL, usersid);
/* FIXME: Successfully test userunmanaged with a different user */
test_MsiEnumPatchesEx_machine();
+ LocalFree(usersid);
}
static void test_MsiEnumPatches(void)
@@ -9864,6 +9874,7 @@
RegCloseKey(udprod);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
+ LocalFree(usersid);
}
static void test_MsiGetPatchInfoEx(void)
@@ -10876,6 +10887,7 @@
RegCloseKey(props);
RegDeleteKeyA(udprod, "");
RegCloseKey(udprod);
+ LocalFree(usersid);
}
static void test_MsiEnumProducts(void)
Modified: trunk/rostests/winetests/msi/source.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/source.c?re…
==============================================================================
--- trunk/rostests/winetests/msi/source.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/source.c [iso-8859-1] Mon Nov 16 02:15:54 2009
@@ -628,6 +628,7 @@
RegDeleteKeyA(userkey, "");
RegCloseKey(hkey);
RegCloseKey(userkey);
+ LocalFree(usersid);
}
static void test_MsiSourceListAddSourceEx(void)
@@ -1605,6 +1606,7 @@
RegCloseKey(source);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
+ LocalFree(usersid);
}
static void test_MsiSourceListSetInfo(void)
@@ -2015,6 +2017,7 @@
RegCloseKey(source);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
+ LocalFree(usersid);
}
static void test_MsiSourceListAddMediaDisk(void)
@@ -2312,6 +2315,7 @@
RegCloseKey(source);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
+ LocalFree(usersid);
}
static void test_MsiSourceListEnumMediaDisks(void)
@@ -3114,6 +3118,7 @@
RegCloseKey(source);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
+ LocalFree(usersid);
}
static void test_MsiSourceListAddSource(void)
@@ -3369,6 +3374,7 @@
RegCloseKey(source);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
+ LocalFree(usersid);
}
START_TEST(source)