https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6ff51864fbcfd68b4620d48c93226158ea625020

commit 6ff51864fbcfd68b4620d48c93226158ea625020
Author:     winesync <[email protected]>
AuthorDate: Sat Mar 12 23:57:42 2022 +0100
Commit:     Mark Jansen <[email protected]>
CommitDate: Sun Mar 20 19:28:02 2022 +0100

    [WINESYNC] msi/tests: Add a test for repetitive MsiGetActiveDatabase calls.
    
    Signed-off-by: Dmitry Timoshkov <[email protected]>
    Signed-off-by: Hans Leidekker <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id 06fd9bb3178c363bdcc89586248a2ce707f94041 by Dmitry Timoshkov 
<[email protected]>
---
 modules/rostests/winetests/msi/custom.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/modules/rostests/winetests/msi/custom.c 
b/modules/rostests/winetests/msi/custom.c
index c9ec82fd930..cd6cb0c3787 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -281,7 +281,7 @@ static void test_db(MSIHANDLE hinst)
                                         VT_EMPTY, VT_EMPTY, VT_LPSTR, 
VT_EMPTY, VT_LPSTR,
                                         VT_EMPTY, VT_EMPTY, VT_EMPTY, 
VT_EMPTY, VT_I4,
                                         VT_I4, VT_EMPTY, VT_EMPTY, VT_EMPTY, 
VT_EMPTY };
-    MSIHANDLE hdb, view, rec, rec2, suminfo;
+    MSIHANDLE hdb, hdb2, view, rec, rec2, suminfo;
     char buffer[10];
     DWORD sz;
     UINT r, count, type, i;
@@ -312,6 +312,17 @@ static void test_db(MSIHANDLE hinst)
     ok(hinst, sz == strlen(buffer), "got size %u\n", sz);
     ok(hinst, !strcmp(buffer, "Name"), "got '%s'\n", buffer);
 
+    /* Test MsiGetActiveDatabase + MsiDatabaseIsTablePersistent once again */
+    hdb2 = MsiGetActiveDatabase(hinst);
+    ok(hinst, hdb2, "MsiGetActiveDatabase failed\n");
+    ok(hinst, hdb2 != hdb, "db handles should be different\n");
+
+    r = MsiDatabaseIsTablePersistentA(hdb2, "Test");
+    ok(hinst, r == MSICONDITION_TRUE, "got %u\n", r);
+
+    r = MsiCloseHandle(hdb2);
+    ok(hinst, !r, "got %u\n", r);
+
     r = MsiCloseHandle(rec2);
     ok(hinst, !r, "got %u\n", r);
 

Reply via email to