Commit 2e19d495 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

msi: Check that transforms preserve tables.

parent 33c63474
......@@ -1720,6 +1720,14 @@ static void test_generate_transform(void)
r = run_query(hdb1, 0, query);
ok(r == ERROR_SUCCESS, "failed to add table\n");
query = "INSERT INTO `AAR` ( `BAR`, `CAR` ) VALUES ( 1, 'vw' )";
r = run_query(hdb1, 0, query);
ok(r == ERROR_SUCCESS, "failed to add row 1\n");
query = "INSERT INTO `AAR` ( `BAR`, `CAR` ) VALUES ( 2, 'bmw' )";
r = run_query(hdb1, 0, query);
ok(r == ERROR_SUCCESS, "failed to add row 2\n");
todo_wine {
r = MsiDatabaseGenerateTransform(hdb1, hdb2, NULL, 0, 0);
ok( r == ERROR_SUCCESS, "return code %d, should be ERROR_SUCCESS\n", r );
......@@ -1727,11 +1735,19 @@ static void test_generate_transform(void)
r = MsiDatabaseGenerateTransform(hdb1, hdb2, mstfile, 0, 0);
ok( r == ERROR_SUCCESS, "return code %d, should be ERROR_SUCCESS\n", r );
/* database needs to be committed */
MsiDatabaseCommit(hdb1);
r = MsiDatabaseGenerateTransform(hdb1, hdb2, mstfile, 0, 0);
ok( r == ERROR_SUCCESS, "return code %d, should be ERROR_SUCCESS\n", r );
MsiCloseHandle( hdb1 );
r = MsiDatabaseApplyTransform( hdb2, mstfile, 0 );
ok( r == ERROR_SUCCESS, "return code %d, should be ERROR_SUCCESS\n", r );
MsiDatabaseCommit(hdb2);
/* apply the same transform again? */
r = MsiDatabaseApplyTransform( hdb2, mstfile, 0 );
ok( r == ERROR_INSTALL_TRANSFORM_FAILURE,
......@@ -1741,6 +1757,18 @@ static void test_generate_transform(void)
MsiCloseHandle( hdb2 );
DeleteFile(msifile);
r = MsiOpenDatabase(msifile2, MSIDBOPEN_READONLY, &hdb1 );
ok( r == ERROR_SUCCESS , "Failed to create database\n" );
todo_wine {
query = "select `BAR`,`CAR` from `AAR`";
r = run_query(hdb1, 0, query);
ok(r == ERROR_SUCCESS, "select query failed\n");
}
MsiCloseHandle( hdb1 );
DeleteFile(msifile2);
DeleteFile(mstfile);
}
......
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