[Htmlparser-cvs] htmlparser/src/org/htmlparser/tests ParserTest.java,1.54,1.55
Brought to you by:
derrickoswald
From: <der...@pr...> - 2004-01-26 12:42:00
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3286/tests Modified Files: ParserTest.java Log Message: Fix bug #880283 Character ">" erroneously inserted by Lexer. Some jsp tags are now handled in a separate jsp parse in the lexer. Jsp tags embedded as attributes are still not handled. Refer to bug #772700 Jsp Tags are not parsed correctly when in quoted attributes, which is now reversed (i.e. in quotes are OK, outside of quotes causes problems), but this points out a deficiency in the data structure holding tag contents (attribute lists) that doesn't provide for tags within attributes. Index: ParserTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/ParserTest.java,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** ParserTest.java 14 Jan 2004 02:53:47 -0000 1.54 --- ParserTest.java 24 Jan 2004 17:15:43 -0000 1.55 *************** *** 845,847 **** --- 845,861 ---- } } + /** + * Test reproducing a java.lang.StackOverflowError. + */ + public void testXMLTypeToString () throws Exception + { + String guts; + String output; + + guts = "TD width=\"69\"/"; + createParser ("<" + guts + ">"); + parseAndAssertNodeCount (1); + output = node[0].toString (); // this was where StackOverflow was thrown + assertTrue ("bad toString()", -1 != output.indexOf (guts)); + } } |