Commit 06fd9bb3 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

msi/tests: Add a test for repetitive MsiGetActiveDatabase calls.

parent ff012937
......@@ -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);
......
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