mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 14:37:45 +00:00
[WINESYNC] msi/tests: Add more tests for MSIMODIFY_REFRESH.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id d2e51963a6218e1ecb3d8127004b9c8c128dd746 by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
parent
d2c4626d98
commit
a38f680cef
|
@ -6750,6 +6750,17 @@ static void test_viewmodify_refresh(void)
|
||||||
|
|
||||||
r = MsiViewFetch(hview, &hrec);
|
r = MsiViewFetch(hview, &hrec);
|
||||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
check_record(hrec, 2, "hi", "1");
|
||||||
|
|
||||||
|
MsiRecordSetInteger(hrec, 2, 5);
|
||||||
|
r = MsiViewModify(hview, MSIMODIFY_REFRESH, hrec);
|
||||||
|
ok(!r, "got %u\n", r);
|
||||||
|
check_record(hrec, 2, "hi", "1");
|
||||||
|
|
||||||
|
MsiRecordSetStringA(hrec, 1, "foo");
|
||||||
|
r = MsiViewModify(hview, MSIMODIFY_REFRESH, hrec);
|
||||||
|
ok(!r, "got %u\n", r);
|
||||||
|
check_record(hrec, 2, "hi", "1");
|
||||||
|
|
||||||
query = "UPDATE `Table` SET `B` = 2 WHERE `A` = 'hi'";
|
query = "UPDATE `Table` SET `B` = 2 WHERE `A` = 'hi'";
|
||||||
r = run_query(hdb, 0, query);
|
r = run_query(hdb, 0, query);
|
||||||
|
@ -6758,6 +6769,14 @@ static void test_viewmodify_refresh(void)
|
||||||
r = MsiViewModify(hview, MSIMODIFY_REFRESH, hrec);
|
r = MsiViewModify(hview, MSIMODIFY_REFRESH, hrec);
|
||||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
check_record(hrec, 2, "hi", "2");
|
check_record(hrec, 2, "hi", "2");
|
||||||
|
|
||||||
|
r = run_query(hdb, 0, "UPDATE `Table` SET `B` = NULL WHERE `A` = 'hi'");
|
||||||
|
ok(!r, "got %u\n", r);
|
||||||
|
|
||||||
|
r = MsiViewModify(hview, MSIMODIFY_REFRESH, hrec);
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
check_record(hrec, 2, "hi", "");
|
||||||
|
|
||||||
MsiCloseHandle(hrec);
|
MsiCloseHandle(hrec);
|
||||||
|
|
||||||
MsiViewClose(hview);
|
MsiViewClose(hview);
|
||||||
|
@ -6791,6 +6810,24 @@ static void test_viewmodify_refresh(void)
|
||||||
|
|
||||||
MsiViewClose(hview);
|
MsiViewClose(hview);
|
||||||
MsiCloseHandle(hview);
|
MsiCloseHandle(hview);
|
||||||
|
|
||||||
|
r = MsiDatabaseOpenViewA(hdb, "SELECT `B` FROM `Table` WHERE `A` = 'hello'", &hview);
|
||||||
|
ok(!r, "got %u\n", r);
|
||||||
|
r = MsiViewExecute(hview, 0);
|
||||||
|
ok(!r, "got %u\n", r);
|
||||||
|
|
||||||
|
r = MsiViewFetch(hview, &hrec);
|
||||||
|
ok(!r, "got %u\n", r);
|
||||||
|
check_record(hrec, 1, "2");
|
||||||
|
|
||||||
|
MsiRecordSetInteger(hrec, 1, 8);
|
||||||
|
r = MsiViewModify(hview, MSIMODIFY_REFRESH, hrec);
|
||||||
|
ok(!r, "got %u\n", r);
|
||||||
|
check_record(hrec, 1, "2");
|
||||||
|
|
||||||
|
MsiCloseHandle(hrec);
|
||||||
|
MsiCloseHandle(hview);
|
||||||
|
|
||||||
MsiCloseHandle(hdb);
|
MsiCloseHandle(hdb);
|
||||||
DeleteFileA(msifile);
|
DeleteFileA(msifile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue