[Htmlparser-cvs] htmlparser/src/org/htmlparser/tests/tagTests TagTest.java,1.22,1.23
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-05-17 12:12:53
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests In directory sc8-pr-cvs1:/tmp/cvs-serv30035/org/htmlparser/tests/tagTests Modified Files: TagTest.java Log Message: Fix tab handling on the suggestion of oyoaha (philippe blanc). Rewrite some string handling methods to remove gross inefficiencies. Index: TagTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests/TagTest.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** TagTest.java 12 May 2003 01:37:50 -0000 1.22 --- TagTest.java 17 May 2003 12:12:50 -0000 1.23 *************** *** 641,643 **** --- 641,658 ---- assertStringEquals("Expected HTML","Jane Doe",htmlTag.getLabel()); } + + /** + * From oyoaha + */ + public void testTabText () throws ParserException + { + String testHTML = "<a\thref=\"http://cbc.ca\">"; + createParser (testHTML); + parser.registerScanners (); + parseAndAssertNodeCount (1); + assertTrue("Node should be a LinkTag", node[0] instanceof LinkTag); + LinkTag tag = (LinkTag)node[0]; + String href = tag.getAttribute ("HREF"); + assertStringEquals("Resolved Link","http://cbc.ca", href); + } } |