Mercurial > mxe-octave
annotate src/msvc-msitools-2-tests.patch @ 5281:9057112edb8e
* installer-files/post-install.bat: create qt.conf (Bug #57679)
author | John Donoghue |
---|---|
date | Wed, 29 Jan 2020 08:34:50 -0500 |
parents | 98d994cfc408 |
children |
rev | line source |
---|---|
3137
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
1 diff -urN msitools-0.92-orig/tests/testdatabase.c msitools-0.92/tests/testdatabase.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
2 --- msitools-0.92-orig/tests/testdatabase.c 2013-02-06 17:43:05 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
3 +++ msitools-0.92/tests/testdatabase.c 2013-07-13 21:01:19 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
4 @@ -44,6 +44,10 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
5 #define O_BINARY 0 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
6 #endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
7 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
8 +#ifndef F_OK |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
9 +#define F_OK 0 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
10 +#endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
11 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
12 static const char *msifile = "winetest-db.msi"; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
13 static const char *msifile2 = "winetst2-db.msi"; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
14 static const char *mstfile = "winetst-db.mst"; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
15 @@ -2484,6 +2488,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
16 static void test_try_transform(void) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
17 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
18 #ifdef _WIN32 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
19 + GInputStream *in; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
20 LibmsiDatabase *hdb; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
21 LibmsiQuery *hquery; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
22 LibmsiRecord *hrec; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
23 @@ -2581,7 +2586,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
24 sql = "select * from `MOO` where `NOO` = 3"; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
25 r = do_query(hdb, sql, &hrec); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
26 ok(r == LIBMSI_RESULT_SUCCESS, "select query failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
27 - ok(hrec == NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
28 + ok(hrec == NULL, ""); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
29 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
30 /* check added stream */ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
31 hrec = 0; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
32 @@ -2590,7 +2595,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
33 ok(r == LIBMSI_RESULT_SUCCESS, "select query failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
34 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
35 /* check the contents of the stream */ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
36 - in = libmsi_record_get_stream(rec, 1); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
37 + in = libmsi_record_get_stream(hrec, 1); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
38 ok(in, "Failed to get stream\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
39 sz = g_input_stream_read(in, buffer, sizeof(buffer), NULL, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
40 ok(!memcmp(buffer, "naengmyon", 9), "stream data was wrong\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
41 @@ -2607,7 +2612,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
42 r = libmsi_query_execute(hquery, 0, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
43 ok(r, "query execute failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
44 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
45 - hrec = libmsi_query_fetch(query, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
46 + hrec = libmsi_query_fetch(hquery, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
47 ok(hrec, "Expected result\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
48 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
49 r = libmsi_record_get_int(hrec, 1); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
50 @@ -2623,7 +2628,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
51 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
52 g_object_unref(hrec); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
53 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
54 - hrec = libmsi_query_fetch(query, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
55 + hrec = libmsi_query_fetch(hquery, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
56 ok(hrec, "Expected result\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
57 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
58 r = libmsi_record_get_int(hrec, 1); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
59 @@ -4863,7 +4868,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
60 hdb = libmsi_database_new(msifile, LIBMSI_DB_FLAGS_CREATE, NULL, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
61 ok(hdb, "Expected LIBMSI_RESULT_SUCCESS, got %d\n", r); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
62 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
63 - r = libmsi_database_commit(hdb); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
64 + r = libmsi_database_commit(hdb, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
65 ok(r == LIBMSI_RESULT_SUCCESS, "Expected LIBMSI_RESULT_SUCCESS, got %d\n", r); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
66 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
67 g_object_unref(hdb); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
68 @@ -5756,6 +5761,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
69 static void test_storages_table(void) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
70 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
71 #ifdef _WIN32 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
72 + GInputStream *in; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
73 LibmsiDatabase *hdb; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
74 LibmsiQuery *hquery; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
75 LibmsiRecord *hrec; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
76 diff -urN msitools-0.92-orig/tests/testsuminfo.c msitools-0.92/tests/testsuminfo.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
77 --- msitools-0.92-orig/tests/testsuminfo.c 2013-01-21 11:16:41 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
78 +++ msitools-0.92/tests/testsuminfo.c 2013-07-13 21:17:52 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
79 @@ -48,7 +48,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
80 DeleteFile(msifile); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
81 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
82 /* just libmsi_database_new should not create a file */ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
83 - hdb = libmsi_database_new(msifile, LIBMSI_DB_OPEN_CREATE, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
84 + hdb = libmsi_database_new(msifile, LIBMSI_DB_FLAGS_CREATE, NULL, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
85 ok(hdb, "libmsi_database_new failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
86 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
87 hsuminfo = libmsi_summary_info_new(hdb, 0, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
88 @@ -70,11 +70,11 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
89 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
90 libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_TITLE, "Mike", &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
91 ok(error, "libmsi_summary_info_set_property wrong error\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
92 - g_clear_error(error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
93 + g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
94 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
95 libmsi_summary_info_set_int(hsuminfo, LIBMSI_PROPERTY_CODEPAGE, 1, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
96 ok(error, "libmsi_summary_info_set_property wrong error\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
97 - g_clear_error(error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
98 + g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
99 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
100 g_object_unref(hsuminfo); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
101 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
102 @@ -84,50 +84,50 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
103 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
104 libmsi_summary_info_set_string(hsuminfo, 0, NULL, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
105 g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
106 - g_clear_error(error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
107 + g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
108 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
109 libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_CODEPAGE, NULL, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
110 g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
111 - g_clear_error(error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
112 + g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
113 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
114 libmsi_summary_info_set_int(hsuminfo, LIBMSI_PROPERTY_TITLE, NULL, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
115 g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
116 - g_clear_error(error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
117 + g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
118 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
119 libmsi_summary_info_set_int(hsuminfo, LIBMSI_PROPERTY_AUTHOR, 0, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
120 g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
121 - g_clear_error(error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
122 + g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
123 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
124 libmsi_summary_info_set_int(hsuminfo, LIBMSI_PROPERTY_KEYWORDS, 0, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
125 g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
126 - g_clear_error(error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
127 + g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
128 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
129 libmsi_summary_info_set_filetime(hsuminfo, LIBMSI_PROPERTY_COMMENTS, 0, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
130 g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
131 - g_clear_error(error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
132 + g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
133 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
134 libmsi_summary_info_set_int(hsuminfo, LIBMSI_PROPERTY_TEMPLATE, 0, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
135 g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
136 - g_clear_error(error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
137 + g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
138 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
139 libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_LASTAUTHOR, NULL, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
140 g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_INVALID_PARAMETER); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
141 - g_clear_error(error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
142 + g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
143 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
144 libmsi_summary_info_set_int(hsuminfo, LIBMSI_PROPERTY_UUID, 0, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
145 g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
146 - g_clear_error(error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
147 + g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
148 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
149 libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_VERSION, NULL, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
150 g_assert(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
151 - g_clear_error(error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
152 + g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
153 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
154 libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_TITLE, "Mike", &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
155 ok(!error, "libmsi_summary_info_set_property failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
156 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
157 str = libmsi_summary_info_get_string(hsuminfo, LIBMSI_PROPERTY_TITLE, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
158 ok(!error, "got error"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
159 - ok(!strcpy(str, "Mike")); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
160 + ok(!strcpy(str, "Mike"), ""); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
161 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
162 libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_TITLE, "JungAh", &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
163 ok(!error, "libmsi_summary_info_set_property failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
164 @@ -135,7 +135,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
165 g_object_unref(hsuminfo); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
166 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
167 /* try again with a higher update count */ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
168 - hsuminfo = libmsi_summary_info_new(hdb, 10, NULl); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
169 + hsuminfo = libmsi_summary_info_new(hdb, 10, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
170 ok(hsuminfo, "libmsi_database_get_summary_info failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
171 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
172 libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_TITLE, "JungAh", &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
173 @@ -154,26 +154,26 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
174 libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_AUTHOR, "Mike", &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
175 ok(!error, "libmsi_summary_info_set_property failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
176 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
177 - r = libmsi_summary_info_persist(hsuminfo); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
178 + r = libmsi_summary_info_persist(hsuminfo, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
179 ok(r, "libmsi_summary_info_persist failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
180 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
181 - libmsi_database_commit(hdb); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
182 + libmsi_database_commit(hdb, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
183 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
184 g_object_unref(hsuminfo); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
185 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
186 g_object_unref(hdb); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
187 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
188 /* reread, non-zero update count */ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
189 - hdb = libmsi_database_new(msifile, LIBMSI_DB_OPEN_TRANSACT, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
190 + hdb = libmsi_database_new(msifile, LIBMSI_DB_FLAGS_TRANSACT, NULL, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
191 ok(hdb, "libmsi_database_new failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
192 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
193 - hsuminfo = libmsi_summary_info_new(hdb, 1, NULl); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
194 + hsuminfo = libmsi_summary_info_new(hdb, 1, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
195 ok(hsuminfo, "libmsi_database_get_summary_info failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
196 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
197 r = libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_AUTHOR, "Mike", error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
198 ok(r == LIBMSI_RESULT_SUCCESS, "libmsi_summary_info_set_property wrong error\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
199 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
200 - r = libmsi_summary_info_persist(hsuminfo); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
201 + r = libmsi_summary_info_persist(hsuminfo, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
202 ok(r, "libmsi_summary_info_persist failed %u\n", r); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
203 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
204 g_object_unref(hsuminfo); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
205 @@ -181,7 +181,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
206 /* now with zero update count */ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
207 g_object_unref(hdb); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
208 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
209 - hdb = libmsi_database_new(msifile, LIBMSI_DB_OPEN_READONLY, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
210 + hdb = libmsi_database_new(msifile, LIBMSI_DB_FLAGS_READONLY, NULL, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
211 ok(hdb, "libmsi_database_new failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
212 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
213 hsuminfo = libmsi_summary_info_new(hdb, 0, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
214 @@ -191,7 +191,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
215 todo_wine ok(error, "libmsi_summary_info_set_property wrong error\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
216 g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
217 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
218 - r = libmsi_summary_info_persist(hsuminfo); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
219 + r = libmsi_summary_info_persist(hsuminfo, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
220 ok(!r, "libmsi_summary_info_persist wrong error %u\n", r); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
221 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
222 g_object_unref(hsuminfo); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
223 @@ -317,6 +317,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
224 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
225 static void test_summary_binary(void) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
226 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
227 + GArray *props = NULL; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
228 GError *error = NULL; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
229 LibmsiDatabase *hdb = 0; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
230 LibmsiSummaryInfo *hsuminfo = 0; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
231 @@ -331,7 +332,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
232 ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes(msifile), "file doesn't exist!\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
233 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
234 /* just libmsi_database_new should not create a file */ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
235 - hdb = libmsi_database_new(msifile, LIBMSI_DB_OPEN_READONLY, NULl); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
236 + hdb = libmsi_database_new(msifile, LIBMSI_DB_FLAGS_READONLY, NULL, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
237 ok(hdb, "libmsi_database_new failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
238 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
239 hsuminfo = libmsi_summary_info_new(hdb, 0, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
240 @@ -344,7 +345,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
241 * We can still read its type though...? |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
242 */ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
243 str = libmsi_summary_info_get_string(hsuminfo, LIBMSI_PROPERTY_LASTPRINTED, error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
244 - ok(!error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
245 + ok(!error, ""); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
246 ok(!strcmp(str, "") || !strcmp(str, "7"), |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
247 "Expected empty string or \"7\", got \"%s\"\n", str); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
248 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
249 @@ -362,7 +363,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
250 ok(error, "libmsi_summary_info_set_property failed\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
251 g_clear_error(&error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
252 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
253 - r = libmsi_summary_info_persist( hsuminfo ); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
254 + r = libmsi_summary_info_persist( hsuminfo, NULL ); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
255 ok(!r, "libmsi_summary_info_persist failed %u\n", r); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
256 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
257 g_object_unref( hsuminfo ); |