From: <bo...@us...> - 2013-08-13 11:50:35
|
Revision: 539 http://sourceforge.net/p/xmlunit/code/539 Author: bodewig Date: 2013-08-13 11:50:32 +0000 (Tue, 13 Aug 2013) Log Message: ----------- merge test for Bug#62 from 1.x branch Modified Paths: -------------- trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/examples/test_RecursiveElementNameAndTextQualifier.java trunk/xmlunit/src/user-guide/XMLUnit-Java.xml Modified: trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/examples/test_RecursiveElementNameAndTextQualifier.java =================================================================== --- trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/examples/test_RecursiveElementNameAndTextQualifier.java 2013-08-13 11:45:07 UTC (rev 538) +++ trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/examples/test_RecursiveElementNameAndTextQualifier.java 2013-08-13 11:50:32 UTC (rev 539) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 2008-2009, Jeff Martin, Tim Bacon +Copyright (c) 2008-2009,2013 Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -167,6 +167,25 @@ assertTrue(d.toString(), d.similar()); } + /** + * @see "http://sourceforge.net/p/xmlunit/bugs/62/" + */ + public void testMultipleTextValuesWithAdditionalElement() throws Exception { + ElementQualifier qualifier = + new RecursiveElementNameAndTextQualifier(); + + Element control = document.createElement(TAG_NAME); + control.appendChild(document.createTextNode(TEXT_A)); + control.appendChild(document.createTextNode(TEXT_B)); + control.appendChild(document.createElement(TAG_NAME)); + + Element test = document.createElement(TAG_NAME); + test.appendChild(document.createTextNode(TEXT_A + TEXT_B)); + test.appendChild(document.createElement(TAG_NAME)); + assertTrue("denormalised control text comparable to normalised test text", + qualifier.qualifyForComparison(control, test)); + } + public void setUp() throws Exception { document = XMLUnit.newControlParser().newDocument(); } Modified: trunk/xmlunit/src/user-guide/XMLUnit-Java.xml =================================================================== --- trunk/xmlunit/src/user-guide/XMLUnit-Java.xml 2013-08-13 11:45:07 UTC (rev 538) +++ trunk/xmlunit/src/user-guide/XMLUnit-Java.xml 2013-08-13 11:50:32 UTC (rev 539) @@ -3730,6 +3730,11 @@ <itemizedlist> <listitem> + <literal>RecursiveElementNameAndTextQualifier</literal> had some indices + reversed leading to wrong results in some cases. + <ulink + href="https://sourceforge.net/p/xmlunit/bugs/62/">Issue + 62</ulink> </listitem> </itemizedlist> </section> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |