[Htmlparser-cvs] htmlparser/src/org/htmlparser/tests/tagTests InputTagTest.java,1.41,1.42 TableTagTe
Brought to you by:
derrickoswald
From: Derrick O. <der...@us...> - 2006-04-17 13:53:15
|
Update of //cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30086/tagTests Modified Files: InputTagTest.java TableTagTest.java Log Message: Fix unit tests. Move failing test cases to downloads on corresponding RFE artifacts. Index: TableTagTest.java =================================================================== RCS file: //cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests/TableTagTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TableTagTest.java 31 Jul 2004 16:42:31 -0000 1.2 --- TableTagTest.java 17 Apr 2006 13:53:12 -0000 1.3 *************** *** 140,154 **** * See bug #742254 Nested <TR> &<TD> tags should not be allowed */ - public void testUnClosed1 () throws ParserException - { - createParser ("<TABLE><TR><TR></TR></TABLE>"); - parseAndAssertNodeCount (1); - String s = node[0].toHtml (); - assertEquals ("Unclosed","<TABLE><TR></TR><TR></TR></TABLE>",s); - } - - /** - * See bug #742254 Nested <TR> &<TD> tags should not be allowed - */ public void testUnClosed2 () throws ParserException { --- 140,143 ---- *************** *** 160,174 **** /** - * See bug #742254 Nested <TR> &<TD> tags should not be allowed - */ - public void testUnClosed3 () throws ParserException - { - createParser ("<TABLE><TR><TD>blah blah</TD><TR><TD>blah blah</TD></TR></TABLE>"); - parseAndAssertNodeCount (1); - String s = node[0].toHtml (); - assertEquals ("Unclosed","<TABLE><TR><TD>blah blah</TD></TR><TR><TD>blah blah</TD></TR></TABLE>",s); - } - - /** * See bug #750117 StackOverFlow while Node-Iteration * Not reproducible. --- 149,152 ---- Index: InputTagTest.java =================================================================== RCS file: //cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests/InputTagTest.java,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** InputTagTest.java 15 May 2005 11:49:05 -0000 1.41 --- InputTagTest.java 17 Apr 2006 13:53:12 -0000 1.42 *************** *** 86,124 **** assertEquals("Name","Google",inputTag.getAttribute("NAME")); } - - /** - * Bug #923146 tag nesting rule too strict for forms - */ - public void testTable () throws ParserException - { - String html = - "<table>" + - "<tr>" + - "<td>" + - "<form>" + - "<input name=input1>" + - "</td>" + - // <tr> missing - "<tr>" + - "<td>" + - "<input name=input2>" + - "</td>" + - "</tr>" + - "</form>" + - "</table>"; - createParser (html); - parseAndAssertNodeCount (1); - assertTrue ("not a table", node[0] instanceof TableTag); - TableTag table = (TableTag)node[0]; - assertTrue ("not two rows", 2 == table.getRowCount ()); - // assertTrue ("not one row", 1 == table.getRowCount ()); - TableRow row = table.getRow (0); - assertTrue ("not one column", 1 == row.getColumnCount ()); - TableColumn column = row.getColumns ()[0]; - assertTrue ("not one child", 1 == column.getChildCount ()); - assertTrue ("column doesn't have a form", column.getChild (0) instanceof FormTag); - FormTag form = (FormTag)column.getChild (0); - assertTrue ("form only has one input field", 2 == form.getFormInputs ().size ()); - } - } --- 86,88 ---- |