Commit 4e2d8b13 authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

msxml6/tests: Add tests for get_xml.

parent df719787
...@@ -66,6 +66,7 @@ static void test_namespaces_as_attributes(void) ...@@ -66,6 +66,7 @@ static void test_namespaces_as_attributes(void)
const WCHAR *basenames[3]; const WCHAR *basenames[3];
const WCHAR *uris[3]; const WCHAR *uris[3];
const WCHAR *texts[3]; const WCHAR *texts[3];
const WCHAR *xmls[3];
}; };
static const struct test tests[] = static const struct test tests[] =
{ {
...@@ -76,6 +77,7 @@ static void test_namespaces_as_attributes(void) ...@@ -76,6 +77,7 @@ static void test_namespaces_as_attributes(void)
{ L"b", L"d", L"ns" }, /* baseName */ { L"b", L"d", L"ns" }, /* baseName */
{ L"nshref", NULL, L"" }, /* namespaceURI */ { L"nshref", NULL, L"" }, /* namespaceURI */
{ L"b attr", L"d attr", L"nshref" }, /* text */ { L"b attr", L"d attr", L"nshref" }, /* text */
{ L"ns:b=\"b attr\"", L"d=\"d attr\"", L"xmlns:ns=\"nshref\"" }, /* xml */
}, },
/* property only */ /* property only */
{ {
...@@ -85,6 +87,7 @@ static void test_namespaces_as_attributes(void) ...@@ -85,6 +87,7 @@ static void test_namespaces_as_attributes(void)
{ L"d" }, /* baseName */ { L"d" }, /* baseName */
{ NULL }, /* namespaceURI */ { NULL }, /* namespaceURI */
{ L"d attr" }, /* text */ { L"d attr" }, /* text */
{ L"d=\"d attr\"" }, /* xml */
}, },
/* namespace only */ /* namespace only */
{ {
...@@ -94,6 +97,7 @@ static void test_namespaces_as_attributes(void) ...@@ -94,6 +97,7 @@ static void test_namespaces_as_attributes(void)
{ L"ns" }, /* baseName */ { L"ns" }, /* baseName */
{ L"" }, /* namespaceURI */ { L"" }, /* namespaceURI */
{ L"nshref" }, /* text */ { L"nshref" }, /* text */
{ L"xmlns:ns=\"nshref\"" }, /* xml */
}, },
/* no properties or namespaces */ /* no properties or namespaces */
{ {
...@@ -187,6 +191,12 @@ static void test_namespaces_as_attributes(void) ...@@ -187,6 +191,12 @@ static void test_namespaces_as_attributes(void)
ok(!lstrcmpW(str, test->texts[i]), "got %s\n", wine_dbgstr_w(str)); ok(!lstrcmpW(str, test->texts[i]), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str); SysFreeString(str);
str = NULL;
hr = IXMLDOMNode_get_xml(item, &str);
ok(SUCCEEDED(hr), "Failed to get node xml, hr %#lx.\n", hr);
ok(!lstrcmpW(str, test->xmls[i]), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
IXMLDOMNode_Release(item); IXMLDOMNode_Release(item);
} }
......
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