[RICHED20_WINETEST] Sync with Wine Staging 2.2. CORE-12823

svn path=/trunk/; revision=74109
This commit is contained in:
Amine Khaldi 2017-03-05 21:44:19 +00:00
parent a142fcc929
commit b400ac7ae6

View file

@ -99,7 +99,7 @@ static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost *iface,
ITextHostTestImpl *This = impl_from_ITextHost(iface);
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, pIID_ITextHost)) {
*ppvObject = This;
*ppvObject = &This->ITextHost_iface;
ITextHost_AddRef((ITextHost *)*ppvObject);
return S_OK;
}
@ -681,6 +681,16 @@ static void test_TxSetText(void)
ok(memcmp(rettext,settext,SysStringByteLen(rettext)) == 0,
"String returned differs\n");
/* Null-pointer should behave the same as empty-string */
hres = ITextServices_TxSetText(txtserv, 0);
ok(hres == S_OK, "ITextServices_TxSetText failed (result = %x)\n", hres);
hres = ITextServices_TxGetText(txtserv, &rettext);
ok(hres == S_OK, "ITextServices_TxGetText failed (result = %x)\n", hres);
ok(SysStringLen(rettext) == 0,
"String returned of wrong length (expected 0, got %d)\n", SysStringLen(rettext));
SysFreeString(rettext);
ITextServices_Release(txtserv);
ITextHost_Release(host);