From: Jean-Christophe Beaupré Date: Mon, 24 Nov 2014 14:39:55 +0000 (-0500) Subject: saxophonit: Add a test for mixed content. X-Git-Tag: v0.6.11~15^2~19 X-Git-Url: http://nitlanguage.org saxophonit: Add a test for mixed content. Signed-off-by: Jean-Christophe Beaupré --- diff --git a/lib/saxophonit/test_saxophonit.nit b/lib/saxophonit/test_saxophonit.nit index b1b1efc..270ed22 100644 --- a/lib/saxophonit/test_saxophonit.nit +++ b/lib/saxophonit/test_saxophonit.nit @@ -193,4 +193,22 @@ class TestSaxophonit expected.end_document assert_equals end + + fun test_mixed do + var atts = new AttributesImpl + + # TODO For the moment, ignorable white space is not detected. + before_test + parse_string(" \r\n\n baz ") + expected.document_locator = new SAXLocatorImpl + expected.start_document + expected.start_element("", "foo", "foo", atts) + expected.characters(" \n\n") + expected.start_element("", "bar", "bar", atts) + expected.characters(" baz ") + expected.end_element("", "bar", "bar") + expected.end_element("", "foo", "foo") + expected.end_document + assert_equals + end end