mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
msxml3: Implement put_version() for MXWriter.
This commit is contained in:
parent
4fd4a8aeb3
commit
74a7edd41b
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* MXWriter implementation
|
||||
*
|
||||
* Copyright 2011 Nikolay Sivov for CodeWeaversы
|
||||
* Copyright 2011 Nikolay Sivov for CodeWeavers
|
||||
* Copyright 2011 Thomas Mullaly
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@ -525,8 +525,15 @@ static HRESULT WINAPI mxwriter_get_omitXMLDeclaration(IMXWriter *iface, VARIANT_
|
||||
static HRESULT WINAPI mxwriter_put_version(IMXWriter *iface, BSTR version)
|
||||
{
|
||||
mxwriter *This = impl_from_IMXWriter( iface );
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(version));
|
||||
return E_NOTIMPL;
|
||||
|
||||
TRACE("(%p)->(%s)\n", This, debugstr_w(version));
|
||||
|
||||
if (!version) return E_INVALIDARG;
|
||||
|
||||
SysFreeString(This->version);
|
||||
This->version = SysAllocString(version);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mxwriter_get_version(IMXWriter *iface, BSTR *version)
|
||||
|
@ -1191,6 +1191,34 @@ static void test_mxwriter_properties(void)
|
||||
ok(!lstrcmpW(str, _bstr_("1.0")), "got %s\n", wine_dbgstr_w(str));
|
||||
SysFreeString(str);
|
||||
|
||||
/* store version string as is */
|
||||
hr = IMXWriter_put_version(writer, NULL);
|
||||
ok(hr == E_INVALIDARG, "got %08x\n", hr);
|
||||
|
||||
hr = IMXWriter_put_version(writer, _bstr_("1.0"));
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
|
||||
hr = IMXWriter_put_version(writer, _bstr_(""));
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
hr = IMXWriter_get_version(writer, &str);
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
ok(!lstrcmpW(str, _bstr_("")), "got %s\n", wine_dbgstr_w(str));
|
||||
SysFreeString(str);
|
||||
|
||||
hr = IMXWriter_put_version(writer, _bstr_("a.b"));
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
hr = IMXWriter_get_version(writer, &str);
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
ok(!lstrcmpW(str, _bstr_("a.b")), "got %s\n", wine_dbgstr_w(str));
|
||||
SysFreeString(str);
|
||||
|
||||
hr = IMXWriter_put_version(writer, _bstr_("2.0"));
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
hr = IMXWriter_get_version(writer, &str);
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
ok(!lstrcmpW(str, _bstr_("2.0")), "got %s\n", wine_dbgstr_w(str));
|
||||
SysFreeString(str);
|
||||
|
||||
IMXWriter_Release(writer);
|
||||
free_bstrs();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user