From: Andrew Nguyen arethusa26@gmail.com
--- dlls/msi/tests/install.c | 138 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+)
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index c3d0ed2d16b..d29eedf78a3 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -5547,6 +5547,73 @@ static void test_package_validation(void) ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); ok(delete_pf("msitest", FALSE), "directory does not exist\n");
+ DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, ""); + + r = MsiInstallProductA(msifile, NULL); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); + } + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, ";"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, "Intel"); + + r = MsiInstallProductA(msifile, NULL); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); + } + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, "Intel;"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, "Alpha,,Intel;"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, ",;"); + + r = MsiInstallProductA(msifile, NULL); + todo_wine + ok(r == ERROR_INSTALL_PLATFORM_UNSUPPORTED, "Expected ERROR_INSTALL_PLATFORM_UNSUPPORTED, got %u\n", r); + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, "Alpha,,Beta;"); + + r = MsiInstallProductA(msifile, NULL); + todo_wine + ok(r == ERROR_INSTALL_PLATFORM_UNSUPPORTED, "Expected ERROR_INSTALL_PLATFORM_UNSUPPORTED, got %u\n", r); + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, "0"); + + r = MsiInstallProductA(msifile, NULL); + todo_wine + ok(r == ERROR_INSTALL_PLATFORM_UNSUPPORTED, "Expected ERROR_INSTALL_PLATFORM_UNSUPPORTED, got %u\n", r); + DeleteFileA(msifile); create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, "Intel,9999;9999");
@@ -5643,6 +5710,25 @@ static void test_package_validation(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); ok(delete_pf("msitest", FALSE), "directory does not exist\n"); + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, "x64;"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, "x64"); + + r = MsiInstallProductA(msifile, NULL); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); + } } else if (is_wow64) { @@ -5669,6 +5755,25 @@ static void test_package_validation(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); ok(delete_pf("msitest\maximus", TRUE), "file exists\n"); ok(delete_pf("msitest", FALSE), "directory exists\n"); + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, "x64;"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file exists\n"); + ok(delete_pf("msitest", FALSE), "directory exists\n"); + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, "x64"); + + r = MsiInstallProductA(msifile, NULL); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); + } } else { @@ -5680,6 +5785,7 @@ static void test_package_validation(void) ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); ok(delete_pf("msitest", FALSE), "directory does not exist\n");
+ DeleteFileA(msifile); create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, "Alpha,Beta,Intel;0");
@@ -5688,6 +5794,22 @@ static void test_package_validation(void) ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); ok(delete_pf("msitest", FALSE), "directory does not exist\n");
+ DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, "Alpha,Beta,Intel;"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, "Alpha,Beta,Intel"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); + DeleteFileA(msifile); create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, "x64;0");
@@ -5703,6 +5825,22 @@ static void test_package_validation(void) ok(r == ERROR_INSTALL_PLATFORM_UNSUPPORTED, "Expected ERROR_INSTALL_PLATFORM_UNSUPPORTED, got %u\n", r); ok(!delete_pf("msitest\maximus", TRUE), "file exists\n"); ok(!delete_pf("msitest", FALSE), "directory exists\n"); + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, "x64;"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_INSTALL_PLATFORM_UNSUPPORTED, "Expected ERROR_INSTALL_PLATFORM_UNSUPPORTED, got %u\n", r); + ok(!delete_pf("msitest\maximus", TRUE), "file exists\n"); + ok(!delete_pf("msitest", FALSE), "directory exists\n"); + + DeleteFileA(msifile); + create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, "x64"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_INSTALL_PLATFORM_UNSUPPORTED, "Expected ERROR_INSTALL_PLATFORM_UNSUPPORTED, got %u\n", r); + ok(!delete_pf("msitest\maximus", TRUE), "file exists\n"); + ok(!delete_pf("msitest", FALSE), "directory exists\n"); }
error: