Author: cwittich
Date: Sun Dec 6 15:46:53 2009
New Revision: 44439
URL:
http://svn.reactos.org/svn/reactos?rev=44439&view=rev
Log:
sync msi_winetest with wine 1.1.34
Modified:
trunk/rostests/winetests/msi/automation.c
trunk/rostests/winetests/msi/db.c
trunk/rostests/winetests/msi/install.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] Sun Dec 6 15:46:53 2009
@@ -1506,8 +1506,7 @@
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_LASTSAVE_DTM, &varresult,
V_VT(&var));
ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n",
hr);
- /* FIXME: Off by one second */
- todo_wine ok(V_DATE(&var) == V_DATE(&varresult),
"SummaryInfo_PropertyGet expected %lf, but returned %lf\n", V_DATE(&var),
V_DATE(&varresult));
+ ok(V_DATE(&var) == V_DATE(&varresult), "SummaryInfo_PropertyGet
expected %lf, but returned %lf\n", V_DATE(&var), V_DATE(&varresult));
VariantClear(&varresult);
VariantClear(&var);
@@ -1714,12 +1713,12 @@
/* Session::Mode, put */
hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, TRUE);
- todo_wine ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTATEND, &bool);
ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr);
ok(bool, "Reboot at end session mode is %d, expected 1\n", bool);
hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, FALSE); /* set it again so we
don't reboot */
- todo_wine ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
/* Session::Database, get */
hr = Session_Database(pSession, &pDatabase);
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] Sun Dec 6 15:46:53 2009
@@ -7899,6 +7899,80 @@
DeleteFileA("refdb.msi");
DeleteFileA("codepage.idt");
DeleteFileA("binary.dat");
+}
+
+static void test_select_with_tablenames(void)
+{
+ MSIHANDLE hdb, view, rec;
+ LPCSTR query;
+ UINT r;
+ int i;
+
+ int vals[4][2] = {
+ {1,12},
+ {4,12},
+ {1,15},
+ {4,15}};
+
+ hdb = create_db();
+ ok(hdb, "failed to create db\n");
+
+ /* Build a pair of tables with the same column names, but unique data */
+ query = "CREATE TABLE `T1` ( `A` SHORT, `B` SHORT PRIMARY KEY `A`)";
+ r = run_query(hdb, 0, query);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+
+ query = "INSERT INTO `T1` ( `A`, `B` ) VALUES ( 1, 2 )";
+ r = run_query(hdb, 0, query);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+
+ query = "INSERT INTO `T1` ( `A`, `B` ) VALUES ( 4, 5 )";
+ r = run_query(hdb, 0, query);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+
+ query = "CREATE TABLE `T2` ( `A` SHORT, `B` SHORT PRIMARY KEY `A`)";
+ r = run_query(hdb, 0, query);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+
+ query = "INSERT INTO `T2` ( `A`, `B` ) VALUES ( 11, 12 )";
+ r = run_query(hdb, 0, query);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+
+ query = "INSERT INTO `T2` ( `A`, `B` ) VALUES ( 14, 15 )";
+ r = run_query(hdb, 0, query);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+
+
+ /* Test that selection based on prefixing the column with the table
+ * actually selects the right data */
+
+ query = "SELECT T1.A, T2.B FROM T1,T2";
+ r = MsiDatabaseOpenView(hdb, query, &view);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+ r = MsiViewExecute(view, 0);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+
+ for (i = 0; i < 4; i++)
+ {
+ r = MsiViewFetch(view, &rec);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+
+ r = MsiRecordGetInteger(rec, 1);
+ ok(r == vals[i][0], "Expected %d, got %d\n", vals[i][0], r);
+
+ r = MsiRecordGetInteger(rec, 2);
+ ok(r == vals[i][1], "Expected %d, got %d\n", vals[i][1], r);
+
+ MsiCloseHandle(rec);
+ }
+
+ r = MsiViewFetch(view, &rec);
+ ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
+
+ MsiViewClose(view);
+ MsiCloseHandle(view);
+ MsiCloseHandle(hdb);
+ DeleteFileA(msifile);
}
UINT ordervals[6][3] =
@@ -8579,6 +8653,7 @@
test_dbtopackage();
test_droptable();
test_dbmerge();
+ test_select_with_tablenames();
test_insertorder();
test_columnorder();
test_suminfo_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] Sun Dec 6 15:46:53 2009
@@ -920,6 +920,32 @@
"CustomAction\tAction\n"
"TestInstalledProp\t19\t\tTest
failed\t\n";
+static const CHAR aup_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
+ "s72\tS255\tI2\n"
+
"InstallExecuteSequence\tAction\n"
+ "CostFinalize\t\t1000\n"
+ "ValidateProductID\t\t700\n"
+ "CostInitialize\t\t800\n"
+ "FileCost\t\t900\n"
+ "RemoveFiles\t\t3500\n"
+ "InstallFiles\t\t4000\n"
+ "RegisterUser\t\t6000\n"
+ "RegisterProduct\t\t6100\n"
+ "PublishFeatures\t\t6300\n"
+ "PublishProduct\t\t6400\n"
+ "InstallFinalize\t\t6600\n"
+ "InstallInitialize\t\t1500\n"
+ "ProcessComponents\t\t1600\n"
+ "UnpublishFeatures\t\t1800\n"
+ "InstallValidate\t\t1400\n"
+ "LaunchConditions\t\t100\n"
+ "TestAllUsersProp\tALLUSERS AND NOT
REMOVE\t50\n";
+
+static const CHAR aup_custom_action_dat[] =
"Action\tType\tSource\tTarget\tISComments\n"
+ "s72\ti2\tS64\tS0\tS255\n"
+ "CustomAction\tAction\n"
+ "TestAllUsersProp\t19\t\tTest
failed\t\n";
+
typedef struct _msi_table
{
const CHAR *filename;
@@ -1547,6 +1573,19 @@
ADD_TABLE(property)
};
+static const msi_table aup_tables[] =
+{
+ ADD_TABLE(component),
+ ADD_TABLE(directory),
+ ADD_TABLE(feature),
+ ADD_TABLE(feature_comp),
+ ADD_TABLE(file),
+ ADD_TABLE(aup_install_exec_seq),
+ ADD_TABLE(aup_custom_action),
+ ADD_TABLE(media),
+ ADD_TABLE(property)
+};
+
static const msi_table fiu_tables[] =
{
ADD_TABLE(rof_component),
@@ -2810,7 +2849,7 @@
ReadFile(file, buf, sizeof(buf) - 1, &size, NULL);
CloseHandle(file);
}
- ok( !lstrcmp( buf, "maximus" ), "Expected file to be overwritten, got
'%s'\n", buf );
+ ok(!memcmp( buf, "maximus", sizeof("maximus")-1 ), "Expected
file to be overwritten, got '%s'\n", buf);
ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
ok(delete_pf("msitest", FALSE), "File not installed\n");
@@ -6730,6 +6769,37 @@
delete_test_files();
}
+static void test_allusers_prop(void)
+{
+ UINT r;
+
+ create_test_files();
+ create_database(msifile, aup_tables, sizeof(aup_tables) / sizeof(msi_table));
+
+ MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
+
+ r = MsiInstallProductA(msifile, "FULL=1");
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
+
+ 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();
+}
+
static char session_manager[] = "System\\CurrentControlSet\\Control\\Session
Manager";
static char rename_ops[] = "PendingFileRenameOperations";
@@ -7065,6 +7135,7 @@
test_file_in_use();
test_file_in_use_cab();
test_MsiSetExternalUI();
+ test_allusers_prop();
DeleteFileA(log_file);