Daniel Lehman : msxml3/tests: Add some processing instruction tests.
Alexandre Julliard
julliard at winehq.org
Fri Oct 22 14:46:11 CDT 2021
Module: wine
Branch: master
Commit: 3186df70cc9730a18052d4264f3494ea336115a0
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3186df70cc9730a18052d4264f3494ea336115a0
Author: Daniel Lehman <dlehman25 at gmail.com>
Date: Fri Oct 22 16:41:25 2021 +0300
msxml3/tests: Add some processing instruction tests.
Signed-off-by: Daniel Lehman <dlehman25 at gmail.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msxml3/tests/domdoc.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index 9e9789ebd9a..d98a87f6d9c 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -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));
More information about the wine-cvs
mailing list