From: Elias R. <ge...@us...> - 2003-10-17 21:24:20
|
User: genman Date: 03/10/17 14:22:01 Modified: src/main/org/jboss/test/util/test Tag: Branch_3_2 PropertyEditorsUnitTestCase.java Log: Validate whitespace preservation is correct Revision Changes Path No revision No revision 1.2.2.3 +6 -2 jbosstest/src/main/org/jboss/test/util/test/PropertyEditorsUnitTestCase.java Index: PropertyEditorsUnitTestCase.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/util/test/PropertyEditorsUnitTestCase.java,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -u -r1.2.2.2 -r1.2.2.3 --- PropertyEditorsUnitTestCase.java 17 Oct 2003 16:51:23 -0000 1.2.2.2 +++ PropertyEditorsUnitTestCase.java 17 Oct 2003 21:22:01 -0000 1.2.2.3 @@ -23,7 +23,7 @@ @see org.jboss.util.propertyeditor.PropertyEditors @author Sco...@jb... -@version $Revision: 1.2.2.2 $ +@version $Revision: 1.2.2.3 $ **/ public class PropertyEditorsUnitTestCase extends JBossTestCase { @@ -205,8 +205,12 @@ // Comments can appear outside of a document String s = "<!-- document --><doc name=\"whatever\"></doc>"; de.setAsText(s); - assertEquals(s, de.getAsText().trim()); + assertTrue("Document :\n" + de.getAsText(), de.getAsText().trim().endsWith(s)); assertTrue(de.getValue() instanceof org.w3c.dom.Document); + // Test whitespace preservation + s = "<element>\n\n<e2></e2> testing\n\n</element>"; + de.setAsText(s); + assertTrue("Document :\n" + de.getAsText() + "\nvs\n" + s, de.getAsText().trim().endsWith(s)); ElementEditor ee = new ElementEditor(); s = "<element>text</element>"; |