public void testCompositeTagWithErroneousAnotherTagAndLineBreak() throws ParserException { String another = "<another>"; String custom = "<custom>\n</custom>"; createParser(another + custom); parser.setNodeFactory( new PrototypicalNodeFactory( new Tag[] { new CustomTag(), new AnotherTag(false), })); parseAndAssertNodeCount(2); AnotherTag anotherTag = (AnotherTag) node[0]; assertEquals("another tag child count", 0, anotherTag.getChildCount()); CustomTag customTag = (CustomTag) node[1]; assertEquals("child count", 1, customTag.getChildCount()); assertFalse("custom tag should not be xml end tag", customTag.isEmptyXmlTag()); assertEquals("starting loc", 9, customTag.getStartPosition()); assertEquals("ending loc", 17, customTag.getEndPosition()); assertEquals("starting line position", 0, customTag.getStartingLineNumber()); assertEquals("ending line position", 1, customTag.getEndTag().getEndingLineNumber()); assertStringEquals("another tag html", another + "</another>", anotherTag.toHtml()); assertStringEquals("custom tag html", custom, customTag.toHtml()); }