Update of //cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/utilTests
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv32405/tests/utilTests
Modified Files:
BeanTest.java
Log Message:
fix bug#1496863 StringBean collapse() adds extra whitespace
Keep collapsing state machine state as member variable.
Index: BeanTest.java
===================================================================
RCS file: //cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/utilTests/BeanTest.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** BeanTest.java 31 Jul 2004 16:42:32 -0000 1.50
--- BeanTest.java 30 May 2006 01:07:15 -0000 1.51
***************
*** 496,500 ****
* Test output with pre and script tags
*/
! public void xtestOutputWithPreAndScriptTags() {
StringBean sb;
sb = new StringBean ();
--- 496,501 ----
* Test output with pre and script tags
*/
! public void xtestOutputWithPreAndScriptTags ()
! {
StringBean sb;
sb = new StringBean ();
***************
*** 511,514 ****
--- 512,535 ----
}
+ /**
+ * Test output with non-breaking tag within text.
+ */
+ public void testTagWhitespace ()
+ {
+ StringBean sb;
+ sb = new StringBean ();
+
+ String pre = "AAAAA BBBBB AAA";
+ String mid = "AA";
+ String post = " BBBBB";
+ String html =
+ "<HTML>\r\n"
+ + "<body>\r\n"
+ + "<p>" + pre + "<font color='red'>" + mid + "</font>" + post + "</p>\r\n"
+ + "</body>\r\n"
+ + "</HTML>\r\n";
+
+ check (sb, html, pre + mid + post);
+ }
}
|