Commit b4bb6e5b authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Add the _Property table back, with tests.

parent d677bd7f
......@@ -207,8 +207,6 @@ struct tagMSIVIEW
struct msi_dialog_tag;
typedef struct msi_dialog_tag msi_dialog;
#define PROPERTY_HASH_SIZE 67
typedef struct tagMSIPACKAGE
{
MSIOBJECTHDR hdr;
......@@ -243,8 +241,6 @@ typedef struct tagMSIPACKAGE
UINT WordCount;
struct list props[PROPERTY_HASH_SIZE];
struct list subscriptions;
} MSIPACKAGE;
......
......@@ -1943,11 +1943,8 @@ static void test_formatrecord_package(void)
MsiRecordSetString(hrec, 0, "{a[one]bc[bad]de[two]f}");
r = MsiFormatRecord(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
todo_wine
{
ok( sz == 0, "size wrong(%i)\n",sz);
ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
}
ok( sz == 0, "size wrong(%i)\n",sz);
ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
MsiSetProperty(package, "bad", "");
sz = sizeof buffer;
......
......@@ -1500,6 +1500,22 @@ static void test_props(void)
ok( r == ERROR_MORE_DATA, "return wrong\n");
ok( !strcmp(buffer,"Photoshop.dl"), "buffer wrong\n");
r = MsiSetProperty(hpkg, "property", "value");
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
sz = 6;
r = MsiGetProperty(hpkg, "property", buffer, &sz);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok( !strcmp(buffer, "value"), "Expected value, got %s\n", buffer);
r = MsiSetProperty(hpkg, "property", NULL);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
sz = 6;
r = MsiGetProperty(hpkg, "property", buffer, &sz);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok( !strlen(buffer), "Expected empty string, got %s\n", buffer);
MsiCloseHandle( hpkg );
DeleteFile(msifile);
}
......
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