[PATCH 2/3] xmllite/writer: Fix indentation on WriteElementString()

Nikolay Sivov nsivov at codeweavers.com
Sun Jul 23 06:55:45 CDT 2017


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/xmllite/tests/writer.c | 6 +++++-
 dlls/xmllite/writer.c       | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c
index 6408b54cfa..b82e15477a 100644
--- a/dlls/xmllite/tests/writer.c
+++ b/dlls/xmllite/tests/writer.c
@@ -1132,15 +1132,19 @@ static void test_indentation(void)
     hr = IXmlWriter_WriteElementString(writer, NULL, bW, NULL, NULL);
     ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
 
+    hr = IXmlWriter_WriteElementString(writer, NULL, bW, NULL, NULL);
+    ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+
     hr = IXmlWriter_WriteEndElement(writer);
     ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
 
     hr = IXmlWriter_Flush(writer);
     ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
 
-    CHECK_OUTPUT_TODO(stream,
+    CHECK_OUTPUT(stream,
         "<a>\r\n"
         "  <b />\r\n"
+        "  <b />\r\n"
         "</a>");
 
     IStream_Release(stream);
diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c
index ba0c60ad37..ac28c47b3c 100644
--- a/dlls/xmllite/writer.c
+++ b/dlls/xmllite/writer.c
@@ -843,6 +843,7 @@ static HRESULT WINAPI xmlwriter_WriteElementString(IXmlWriter *iface, LPCWSTR pr
     }
 
     write_encoding_bom(This);
+    write_node_indent(This);
     write_output_buffer(This->output, ltW, ARRAY_SIZE(ltW));
     write_output_qname(This->output, prefix, local_name);
 
-- 
2.13.2




More information about the wine-patches mailing list