msxml3/tests: Add some processing instruction tests.

Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Daniel Lehman 2021-10-22 16:41:25 +03:00 committed by Alexandre Julliard
parent 5d78033a90
commit 3186df70cc
1 changed files with 25 additions and 0 deletions

View File

@ -8594,6 +8594,31 @@ static void test_createProcessingInstruction(void)
hr = IXMLDOMDocument_createProcessingInstruction(doc, _bstr_("xml"), _bstr_("version=\"1.0\" encoding=\"windows-1252\" dummy=\"value\""), &pi);
todo_wine
ok(hr == XML_E_UNEXPECTED_ATTRIBUTE, "got 0x%08x\n", hr);
hr = IXMLDOMDocument_createProcessingInstruction(doc, NULL, _bstr_("version=\"1.0\" encoding=\"UTF-8\""), &pi);
ok(hr == E_FAIL, "got 0x%08x\n", hr);
hr = IXMLDOMDocument_createProcessingInstruction(doc, _bstr_("xml"), NULL, &pi);
todo_wine
ok(hr == XML_E_XMLDECLSYNTAX, "got 0x%08x\n", hr);
hr = IXMLDOMDocument_createProcessingInstruction(doc, _bstr_("xml"), _bstr_("version=\"1.0\" encoding=UTF-8"), &pi);
todo_wine
ok(hr == XML_E_MISSINGQUOTE, "got 0x%08x\n", hr);
hr = IXMLDOMDocument_createProcessingInstruction(doc, _bstr_("xml"), _bstr_("version=\"1.0\" encoding='UTF-8\""), &pi);
todo_wine
ok(hr == XML_E_BADCHARINSTRING, "got 0x%08x\n", hr);
hr = IXMLDOMDocument_createProcessingInstruction(doc, _bstr_("xml"), _bstr_("version=\"1.0\" encoding=\"UTF-8"), &pi);
todo_wine
ok(hr == XML_E_BADCHARINSTRING, "got 0x%08x\n", hr);
hr = IXMLDOMDocument_createProcessingInstruction(doc, _bstr_("xml"), _bstr_("version=\"1.0\" encoding='UTF-8'"), &pi);
ok(hr == S_OK, "got 0x%08x\n", hr);
hr = IXMLDOMProcessingInstruction_QueryInterface(pi, &IID_IXMLDOMNode, (void **)&node);
node_map = NULL;
ok(hr == S_OK, "got 0x%08x\n", hr);
hr = IXMLDOMNode_get_attributes(node, &node_map);
todo_wine
ok(hr == S_OK, "got 0x%08x\n", hr);
if (node_map) IXMLDOMNamedNodeMap_Release(node_map);
IXMLDOMNode_Release(node);
IXMLDOMProcessingInstruction_Release(pi);
/* test for BSTR handling, pass broken BSTR */
memcpy(&buff[2], L"test", 5 * sizeof(WCHAR));