Nikolay Sivov : xmllite/tests: A couple of newline normalization tests for text nodes.

Alexandre Julliard julliard at winehq.org
Wed Mar 8 16:01:37 CST 2017


Module: wine
Branch: master
Commit: 2d3ec1247d4695b65a7f91eda6a6cafd973af89b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2d3ec1247d4695b65a7f91eda6a6cafd973af89b

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Mar  8 07:07:07 2017 +0300

xmllite/tests: A couple of newline normalization tests for text nodes.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/xmllite/tests/reader.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c
index 60652ee..ebf4f5d 100644
--- a/dlls/xmllite/tests/reader.c
+++ b/dlls/xmllite/tests/reader.c
@@ -1724,6 +1724,8 @@ static void test_read_cdata(void)
 static struct test_entry text_tests[] = {
     { "<a>simple text</a>", "", "simple text", S_OK },
     { "<a>text ]]> text</a>", "", "", WC_E_CDSECTEND },
+    { "<a>\n \r\n \n\n text</a>", "", "\n \n \n\n text", S_OK, S_OK, TRUE },
+    { "<a>\r \r\r\n \n\n text</a>", "", "\n \n\n \n\n text", S_OK, S_OK, TRUE },
     { NULL }
 };
 
@@ -1748,17 +1750,13 @@ static void test_read_text(void)
         type = XmlNodeType_None;
         hr = IXmlReader_Read(reader, &type);
 
-        /* read one more to get to CDATA */
+        /* read one more to get to text node */
         if (type == XmlNodeType_Element)
         {
             type = XmlNodeType_None;
             hr = IXmlReader_Read(reader, &type);
         }
-
-        if (test->hr_broken)
-            ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml);
-        else
-            ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+        ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
         if (hr == S_OK)
         {
             const WCHAR *str;




More information about the wine-cvs mailing list