Commit 3186df70 authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

msxml3/tests: Add some processing instruction tests.

parent 5d78033a
......@@ -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));
......
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