mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +00:00
[WINESYNC] msi/tests: Add some tests for remote MSI summary info APIs.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 4acd7b6c45faa960aee3d753d2979315ad4d2b46 by Dmitry Timoshkov <dmitry@baikal.ru>
This commit is contained in:
parent
2a9ae85885
commit
a8bfcb28ab
1 changed files with 51 additions and 1 deletions
|
@ -30,6 +30,7 @@
|
||||||
#include <msxml.h>
|
#include <msxml.h>
|
||||||
#include <msi.h>
|
#include <msi.h>
|
||||||
#include <msiquery.h>
|
#include <msiquery.h>
|
||||||
|
#include <msidefs.h>
|
||||||
|
|
||||||
static int todo_level, todo_do_loop;
|
static int todo_level, todo_do_loop;
|
||||||
|
|
||||||
|
@ -279,7 +280,9 @@ static void test_db(MSIHANDLE hinst)
|
||||||
MSIHANDLE hdb, view, rec, rec2, suminfo;
|
MSIHANDLE hdb, view, rec, rec2, suminfo;
|
||||||
char buffer[10];
|
char buffer[10];
|
||||||
DWORD sz;
|
DWORD sz;
|
||||||
UINT r;
|
UINT r, count, type;
|
||||||
|
INT int_value;
|
||||||
|
FILETIME ft;
|
||||||
|
|
||||||
hdb = MsiGetActiveDatabase(hinst);
|
hdb = MsiGetActiveDatabase(hinst);
|
||||||
ok(hinst, hdb, "MsiGetActiveDatabase failed\n");
|
ok(hinst, hdb, "MsiGetActiveDatabase failed\n");
|
||||||
|
@ -452,6 +455,53 @@ static void test_db(MSIHANDLE hinst)
|
||||||
r = MsiGetSummaryInformationA(hdb, NULL, 1, &suminfo);
|
r = MsiGetSummaryInformationA(hdb, NULL, 1, &suminfo);
|
||||||
ok(hinst, !r, "got %u\n", r);
|
ok(hinst, !r, "got %u\n", r);
|
||||||
|
|
||||||
|
r = MsiSummaryInfoGetPropertyCount(suminfo, NULL);
|
||||||
|
todo_wine
|
||||||
|
ok(hinst, r == RPC_X_NULL_REF_POINTER, "got %u\n", r);
|
||||||
|
|
||||||
|
count = 0xdeadbeef;
|
||||||
|
r = MsiSummaryInfoGetPropertyCount(suminfo, &count);
|
||||||
|
todo_wine
|
||||||
|
ok(hinst, !r, "got %u\n", r);
|
||||||
|
todo_wine
|
||||||
|
ok(hinst, count == 5, "got %u\n", count);
|
||||||
|
|
||||||
|
r = MsiSummaryInfoGetPropertyA(suminfo, 0, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
todo_wine
|
||||||
|
ok(hinst, r == RPC_X_NULL_REF_POINTER, "got %u\n", r);
|
||||||
|
|
||||||
|
type = 0xdeadbeef;
|
||||||
|
int_value = 0xdeadbeef;
|
||||||
|
strcpy(buffer, "deadbeef");
|
||||||
|
sz = sizeof(buffer);
|
||||||
|
r = MsiSummaryInfoGetPropertyA(suminfo, PID_AUTHOR, &type, &int_value, &ft, buffer, &sz);
|
||||||
|
todo_wine
|
||||||
|
ok(hinst, !r, "got %u\n", r);
|
||||||
|
todo_wine
|
||||||
|
ok(hinst, type == 0, "got %u\n", type);
|
||||||
|
todo_wine
|
||||||
|
ok(hinst, int_value == 0, "got %u\n", int_value);
|
||||||
|
ok(hinst, sz == sizeof(buffer), "got %u\n", sz);
|
||||||
|
ok(hinst, !lstrcmpA(buffer, "deadbeef"), "got %s\n", buffer);
|
||||||
|
|
||||||
|
type = 0xdeadbeef;
|
||||||
|
int_value = 0xdeadbeef;
|
||||||
|
strcpy(buffer, "deadbeef");
|
||||||
|
sz = sizeof(buffer);
|
||||||
|
r = MsiSummaryInfoGetPropertyA(suminfo, PID_CODEPAGE, &type, &int_value, &ft, buffer, &sz);
|
||||||
|
todo_wine
|
||||||
|
ok(hinst, !r, "got %u\n", r);
|
||||||
|
todo_wine
|
||||||
|
ok(hinst, type == 0, "got %u\n", type);
|
||||||
|
todo_wine
|
||||||
|
ok(hinst, int_value == 0, "got %u\n", int_value);
|
||||||
|
ok(hinst, sz == sizeof(buffer), "got %u\n", sz);
|
||||||
|
ok(hinst, !lstrcmpA(buffer, "deadbeef"), "got %s\n", buffer);
|
||||||
|
|
||||||
|
r = MsiSummaryInfoSetPropertyA(suminfo, PID_CODEPAGE, VT_I2, 1252, &ft, "");
|
||||||
|
todo_wine
|
||||||
|
ok(hinst, r == ERROR_FUNCTION_FAILED, "got %u\n", r);
|
||||||
|
|
||||||
r = MsiCloseHandle(suminfo);
|
r = MsiCloseHandle(suminfo);
|
||||||
ok(hinst, !r, "got %u\n", r);
|
ok(hinst, !r, "got %u\n", r);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue