Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/scannersTests
In directory sc8-pr-cvs1:/tmp/cvs-serv21759/org/htmlparser/tests/scannersTests
Modified Files:
SelectTagScannerTest.java OptionTagScannerTest.java
Log Message:
For Dhaval:
I have converted the OptionTag to a composite tag. The problem that is present
with Label tag exists here a well so my guess is that it is with CompositeTag
itself. Once solved, all related problems will also get solved. In any
case I have commented some test conditions in the OptionTagTest class. You can
uncomment it and see it for yourself.
Some SelectTag test cases are also changed as a result.
Index: SelectTagScannerTest.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/scannersTests/SelectTagScannerTest.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** SelectTagScannerTest.java 5 May 2003 03:12:25 -0000 1.12
--- SelectTagScannerTest.java 10 May 2003 01:47:12 -0000 1.13
***************
*** 41,46 ****
private String testHTML = new String(
! "<Select name=\"Remarks\">" +
"<option value='option1'>option1</option>" +
"</Select>" +
! "<Select name=\"something\">" +
"<option value='option2'>option2</option>" +
"</Select>" +
"<Select></Select>" +
"<Select name=\"Remarks\">The death threats of the organization\n" +
--- 41,50 ----
private String testHTML = new String(
! "<Select name=\"Remarks\">" +
! "<option value='option1'>option1</option>" +
! "</Select>" +
! "<Select name=\"something\">" +
! "<option value='option2'>option2</option>" +
! "</Select>" +
"<Select></Select>" +
"<Select name=\"Remarks\">The death threats of the organization\n" +
***************
*** 83,87 ****
OptionTag [] optionTags = selectTag.getOptionTags();
assertEquals("option tag array length",1,optionTags.length);
! assertEquals("option tag value","option1",optionTags[0].getValue());
}
--- 87,91 ----
OptionTag [] optionTags = selectTag.getOptionTags();
assertEquals("option tag array length",1,optionTags.length);
! assertEquals("option tag value","option1",optionTags[0].getOptionText());
}
***************
*** 91,95 ****
public void testSelectTagWithComments() throws Exception {
createParser(
! "<form>" +
"<select> " +
"<!-- 1 --><option selected>123 " +
"<option>345 " +
"</select> " +
"</form>"
);
parser.registerScanners();
--- 95,104 ----
public void testSelectTagWithComments() throws Exception {
createParser(
! "<form>" +
! "<select> " +
! "<!-- 1 --><option selected>123 " +
! "<option>345 " +
! "</select> " +
! "</form>"
);
parser.registerScanners();
Index: OptionTagScannerTest.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/scannersTests/OptionTagScannerTest.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** OptionTagScannerTest.java 5 May 2003 03:12:25 -0000 1.12
--- OptionTagScannerTest.java 10 May 2003 01:47:12 -0000 1.13
***************
*** 71,73 ****
--- 71,78 ----
}
}
+ public static void main(String[] args)
+ {
+ new junit.awtui.TestRunner().start(new String[] {OptionTagScannerTest.class.getName()});
+ }
+
}
|