From: <bo...@us...> - 2007-08-23 10:59:48
|
Revision: 230 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=230&view=rev Author: bodewig Date: 2007-08-23 03:59:48 -0700 (Thu, 23 Aug 2007) Log Message: ----------- Add test for whitespace handling in the presence of namespaces. Bug report 1779701 Modified Paths: -------------- trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_Diff.java Modified: trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_Diff.java =================================================================== --- trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_Diff.java 2007-08-10 07:30:53 UTC (rev 229) +++ trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_Diff.java 2007-08-23 10:59:48 UTC (rev 230) @@ -706,4 +706,26 @@ assertTrue(d.toString(), d.similar()); } + /** + * Bug Report 1779701 + * @see http://sourceforge.net/tracker/index.php?func=detail&aid=1779701&group_id=23187&atid=377768 + */ + public void testWhitespaceAndNamespaces() throws Exception { + String control = + "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + + "\r\n <env:Header/>" + + "\r\n </env:Envelope>"; + String test = + "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + + "<env:Header/>" + + "</env:Envelope>"; + XMLUnit.setIgnoreWhitespace(true); + try { + Diff diff = XMLUnit.compareXML(control, test); + assertTrue(diff.toString(), diff.identical()); + } finally { + XMLUnit.setIgnoreWhitespace(false); + } + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |