[Htmlparser-cvs] htmlparser/src/org/htmlparser/tests/tagTests TagTest.java,1.25,1.26
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-05-21 12:00:47
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests In directory sc8-pr-cvs1:/tmp/cvs-serv14338/org/htmlparser/tests/tagTests Modified Files: TagTest.java Log Message: See bug #740411 setParsed() has no effect on output. Seems to work in the current 1.3 code base. Index: TagTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests/TagTest.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** TagTest.java 21 May 2003 11:13:34 -0000 1.25 --- TagTest.java 21 May 2003 12:00:42 -0000 1.26 *************** *** 677,679 **** --- 677,699 ---- temp); } + + /** + * See bug #740411 setParsed() has no effect on output. + */ + public void testParameterChange() throws ParserException + { + createParser("<TABLE BORDER=0>"); + parseAndAssertNodeCount(1); + // the node should be an HTMLTag + assertTrue("Node should be a HTMLTag",node[0] instanceof Tag); + Tag tag = (Tag)node[0]; + assertEquals("Initial text should be","TABLE BORDER=0",tag.getText ()); + + Hashtable tempHash = tag.getAttributes (); + tempHash.put ("BORDER","1"); + tag.setAttributes (tempHash); + + String s = tag.toHtml (); + assertEquals("HTML should be","<TABLE BORDER=\"1\" >", s); + } } |