Log Message
Add explicit test for CDATA with embedded tag.
Modified Paths
Diff
Modified: trunk/xstream/src/test/com/thoughtworks/xstream/io/xml/AbstractXMLReaderTest.java (2021 => 2022)
--- trunk/xstream/src/test/com/thoughtworks/xstream/io/xml/AbstractXMLReaderTest.java 2013-02-27 01:00:03 UTC (rev 2021)
+++ trunk/xstream/src/test/com/thoughtworks/xstream/io/xml/AbstractXMLReaderTest.java 2013-02-27 19:10:49 UTC (rev 2022)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2004, 2005 Joe Walnes.
- * Copyright (C) 2006, 2007, 2008, 2011, 2012 XStream Committers.
+ * Copyright (C) 2006, 2007, 2008, 2011, 2012, 2013 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
@@ -235,6 +235,12 @@
HierarchicalStreamReader xmlReader = createReader("<string attr=' A\r\t\nB C	

 '/>");
assertEquals(" A B C\t\n\r ", xmlReader.getAttribute("attr"));
}
+
+ public void testCanReadCDATAWithEmbeddedTags() throws Exception {
+ String content = "<tag>the content</tag>";
+ HierarchicalStreamReader xmlReader = createReader("<string><![CDATA[" + content + "]]></string>");
+ assertEquals(content, xmlReader.getValue());
+ }
// TODO: See XSTR-473
public void todoTestCanReadNullValueInString() throws Exception {
To unsubscribe from this list please visit:
