Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv2396/tests
Modified Files:
LineNumberAssignedByNodeReaderTest.java
Log Message:
Updated tag line numbers test.
***** Line numbers reported by tags are now zero based, not one based. *****
Strip off possible ending slash in tag name.
Index: LineNumberAssignedByNodeReaderTest.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/LineNumberAssignedByNodeReaderTest.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** LineNumberAssignedByNodeReaderTest.java 22 Sep 2003 02:40:04 -0000 1.22
--- LineNumberAssignedByNodeReaderTest.java 3 Oct 2003 00:20:44 -0000 1.23
***************
*** 57,70 ****
*/
public void testLineNumbers() throws ParserException {
! testLineNumber("<Custom/>", 1, 0, 1, 1);
! testLineNumber("<Custom />", 1, 0, 1, 1);
! testLineNumber("<Custom></Custom>", 1, 0, 1, 1);
! testLineNumber("<Custom>Content</Custom>", 1, 0, 1, 1);
! testLineNumber("<Custom>Content<Custom></Custom>", 1, 0, 1, 1);
testLineNumber(
"<Custom>\n" +
" Content\n" +
"</Custom>",
! 1, 0, 1, 3
);
testLineNumber(
--- 57,70 ----
*/
public void testLineNumbers() throws ParserException {
! testLineNumber("<Custom/>", 1, 0, 0, 0);
! testLineNumber("<Custom />", 1, 0, 0, 0);
! testLineNumber("<Custom></Custom>", 1, 0, 0, 0);
! testLineNumber("<Custom>Content</Custom>", 1, 0, 0, 0);
! testLineNumber("<Custom>Content<Custom></Custom>", 1, 0, 0, 0);
testLineNumber(
"<Custom>\n" +
" Content\n" +
"</Custom>",
! 1, 0, 0, 2
);
testLineNumber(
***************
*** 73,77 ****
" Content\n" +
"</Custom>",
! 2, 1, 2, 4
);
testLineNumber(
--- 73,77 ----
" Content\n" +
"</Custom>",
! 2, 1, 1, 3
);
testLineNumber(
***************
*** 80,84 ****
" <Custom>SubContent</Custom>\n" +
"</Custom>",
! 2, 1, 2, 4
);
char[] oneHundredNewLines = new char[100];
--- 80,84 ----
" <Custom>SubContent</Custom>\n" +
"</Custom>",
! 2, 1, 1, 3
);
char[] oneHundredNewLines = new char[100];
***************
*** 90,94 ****
" <Custom>SubContent</Custom>\n" +
"</Custom>",
! 2, 1, 102, 104
);
}
--- 90,94 ----
" <Custom>SubContent</Custom>\n" +
"</Custom>",
! 2, 1, 101, 103
);
}
|