Hans Leidekker : msi: Add a test to show that patches are not committed to the local package database .

Alexandre Julliard julliard at winehq.org
Tue May 11 12:09:38 CDT 2010


Module: wine
Branch: master
Commit: 06a8cc2a0642be7a485320dd1348dab49500fe1f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=06a8cc2a0642be7a485320dd1348dab49500fe1f

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue May 11 14:01:47 2010 +0200

msi: Add a test to show that patches are not committed to the local package database.

---

 dlls/msi/tests/patch.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/tests/patch.c b/dlls/msi/tests/patch.c
index 2c7459d..ad581d1 100644
--- a/dlls/msi/tests/patch.c
+++ b/dlls/msi/tests/patch.c
@@ -717,6 +717,7 @@ static void test_simple_patch( void )
     strcat( path, "\\" );
     strcat( path, msifile );
 
+    /* show that MsiOpenPackage applies registered patches */
     r = MsiOpenPackageA( path, &hpackage );
     ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
 
@@ -739,6 +740,29 @@ static void test_simple_patch( void )
     MsiCloseHandle( hdb );
     MsiCloseHandle( hpackage );
 
+    /* show that patches are not committed to the local package database */
+    size = sizeof(path);
+    r = MsiGetProductInfoA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}",
+                            "LocalPackage", path, &size );
+    ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
+
+    r = MsiOpenDatabaseA( path, MSIDBOPEN_READONLY, &hdb );
+    ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
+
+    r = MsiDatabaseOpenView( hdb, query, &hview );
+    ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
+
+    r = MsiViewExecute( hview, 0 );
+    ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
+
+    r = MsiViewFetch( hview, &hrec );
+    ok( r == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %u\n", r );
+
+    MsiCloseHandle( hrec );
+    MsiViewClose( hview );
+    MsiCloseHandle( hview );
+    MsiCloseHandle( hdb );
+
     r = MsiInstallProductA( msifile, "REMOVE=ALL" );
     ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
 




More information about the wine-cvs mailing list