maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r943628 - /maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java
Date Wed, 12 May 2010 18:47:57 GMT
Author: ltheussl
Date: Wed May 12 18:47:56 2010
New Revision: 943628

URL: http://svn.apache.org/viewvc?rev=943628&view=rev
Log:
[DOXIA-384] adding test case

Modified:
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java?rev=943628&r1=943627&r2=943628&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java
Wed May 12 18:47:56 2010
@@ -335,6 +335,28 @@ public class XdocParserTest
     }
 
     /** @throws Exception  */
+    public void testSourceContainingDTD()
+        throws Exception
+    {
+        String text = "<source><![CDATA[" +
+                          "<!DOCTYPE web-app PUBLIC " +
+                          "\"-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN\"" +
+                          " \"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd\">" +
+                      "]]></source>";
+
+        SinkEventTestingSink sink = new SinkEventTestingSink();
+
+        parser.parse( text, sink );
+
+        Iterator it = sink.getEventList().iterator();
+        assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() );
+        assertFalse( it.hasNext() );
+
+    }
+
+    /** @throws Exception  */
     public void testPreEOL()
         throws Exception
     {



Mime
View raw message