maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r771730 - in /maven/doxia: doxia-sitetools/trunk/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/ doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/ doxia/trunk/doxia-modules/doxia-module-xdoc/src/...
Date Tue, 05 May 2009 13:55:53 GMT
Author: ltheussl
Date: Tue May  5 13:55:53 2009
New Revision: 771730

URL: http://svn.apache.org/viewvc?rev=771730&view=rev
Log:
Update tests for DOXIA-314

Modified:
    maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifier.java
    maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java

Modified: maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifier.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifier.java?rev=771730&r1=771729&r2=771730&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifier.java
(original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifier.java
Tue May  5 13:55:53 2009
@@ -105,11 +105,11 @@
 
         HtmlHeader2 h2 = (HtmlHeader2) elementIterator.next();
         assertNotNull( h2 );
-        assertEquals( h2.asText().trim(), "section name with entities: '&' '\u0391' '
'" );
+        assertEquals( h2.asText().trim(), "section name with entities: '&' '\u0391' '
' '\uD7ED'" );
 
         HtmlAnchor a = (HtmlAnchor) elementIterator.next();
         assertNotNull( a );
-        assertEquals( a.getAttributeValue( "name" ), "section_name_with_entities:___" );
+        assertEquals( a.getAttributeValue( "name" ), "section_name_with_entities:____x1d7ed"
);
 
         div = (HtmlDivision) elementIterator.next();
         assertNotNull( div );

Modified: maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml?rev=771730&r1=771729&r2=771730&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml
(original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml
Tue May  5 13:55:53 2009
@@ -46,7 +46,7 @@
 
   <body>
 
-    <section name="section name with entities: '&amp;' '&Alpha;' '&nbsp;'">
+    <section name="section name with entities: '&amp;' '&Alpha;' '&nbsp;'
'&tritPos;'">
 
       <h4>Entities</h4>
       <h3>Generic Entities: '&amp;' '&lt;' '&gt;' '&quot;' '&apos;'</h3>

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=771730&r1=771729&r2=771730&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
Tue May  5 13:55:53 2009
@@ -442,8 +442,8 @@
     public void testEntities()
         throws Exception
     {
-        final String text = "<!DOCTYPE test [<!ENTITY foo \"&#x159;\">]>"
-                + "<section name=\"&amp;&foo;\" title=\"&amp;&foo;\"><p>&amp;&foo;</p></section>";
+        final String text = "<!DOCTYPE test [<!ENTITY foo \"&#x159;\"><!ENTITY
tritPos  \"&#x1d7ed;\">]>"
+                + "<section name=\"&amp;&foo;&tritPos;\"><p>&amp;&foo;&tritPos;</p></section>";
 
         SinkEventTestingSink sink = new SinkEventTestingSink();
 
@@ -457,7 +457,7 @@
 
         SinkEventElement textEvt = (SinkEventElement) it.next();
         assertEquals( "text", textEvt.getName() );
-        assertEquals( "&\u0159", textEvt.getArgs()[0] );
+        assertEquals( "&\u0159&#x1d7ed;", textEvt.getArgs()[0] );
 
         assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() );
         assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
@@ -470,6 +470,10 @@
         assertEquals( "text", textEvt.getName() );
         assertEquals( "\u0159", textEvt.getArgs()[0] );
 
+        textEvt = (SinkEventElement) it.next();
+        assertEquals( "unknown", textEvt.getName() );
+        assertEquals( "&#x1d7ed;", textEvt.getArgs()[0] );
+
         assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
         assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() );
         assertFalse( it.hasNext() );



Mime
View raw message