Module: wine Branch: master Commit: e31ec426ec6928af3282bd4a1afa95033a5bbbb2 URL: https://gitlab.winehq.org/wine/wine/-/commit/e31ec426ec6928af3282bd4a1afa950...
Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Fri Aug 12 19:45:46 2022 +0900
ieframe/tests: Add a test for IPropertySetStorage::Open with STGM_WRITE.
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com
---
dlls/ieframe/tests/intshcut.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/dlls/ieframe/tests/intshcut.c b/dlls/ieframe/tests/intshcut.c index 9778d77cd11..5d9baa7cd9f 100644 --- a/dlls/ieframe/tests/intshcut.c +++ b/dlls/ieframe/tests/intshcut.c @@ -233,6 +233,25 @@ static void test_ReadAndWriteProperties(void) ok(hr == S_OK, "Failed to commit properties, hr=0x%lx\n", hr);
pPropStgWrite->lpVtbl->Release(pPropStgWrite); + + /* Test with STGM_WRITE */ + hr = IPropertySetStorage_Open(pPropSetStg, &FMTID_Intshcut, STGM_WRITE, &pPropStgWrite); + todo_wine ok(hr == S_OK, "Unable to get an IPropertyStorage for writing, hr=0x%lx\n", hr); + + if (hr == S_OK) + { + memset(pvread, 0, sizeof(pvread)); + hr = IPropertyStorage_ReadMultiple(pPropStgWrite, 2, ps, pvread); + ok(hr == S_OK, "Unable to read properties, hr=0x%lx\n", hr); + ok(pvread[1].vt == VT_I4, "got %d\n", pvread[1].vt); + ok(U(pvread[1]).lVal == iconIndex, "Read wrong icon index: %d\n", U(pvread[1]).iVal); + ok(pvread[0].vt == VT_LPWSTR, "got %d\n", pvread[0].vt); + ok(lstrcmpW(U(pvread[0]).pwszVal, iconPath) == 0, "Wrong icon path read: %s\n", wine_dbgstr_w(U(pvread[0]).pwszVal)); + PropVariantClear(&pvread[0]); + PropVariantClear(&pvread[1]); + + IPropertyStorage_Release(pPropStgWrite); + } urlA->lpVtbl->Release(urlA); IPropertySetStorage_Release(pPropSetStg); }