code: rename identifiers `with` since it is a keyword now
[nit.git] / lib / saxophonit / test_saxophonit.nit
index b1b1efc..c4afbbf 100644 (file)
@@ -50,7 +50,7 @@ class TestSaxophonit
                expected.document_locator = new SAXLocatorImpl
                expected.start_document
                expected.start_element("", "a", "a", new AttributesImpl)
-               expected.fatal_error(new SAXParseException.with(
+               expected.fatal_error(new SAXParseException.with_info(
                                "The type in the closing tag (`b`) does not match the type " +
                                "in the opening tag (`a`).", null, null, 1, 8))
                expected.end_document
@@ -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("<foo>  \r\n\n<bar>  baz  </bar></foo>")
+               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