maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r494255 - /maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/HtmlToolsTest.java
Date Mon, 08 Jan 2007 23:31:22 GMT
Author: dennisl
Date: Mon Jan  8 15:31:21 2007
New Revision: 494255

URL: http://svn.apache.org/viewvc?view=rev&rev=494255
Log:
o Add tests for HtmlTools.escapeHTML().

Modified:
    maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/HtmlToolsTest.java

Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/HtmlToolsTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/HtmlToolsTest.java?view=diff&rev=494255&r1=494254&r2=494255
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/HtmlToolsTest.java
(original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/HtmlToolsTest.java
Mon Jan  8 15:31:21 2007
@@ -28,6 +28,19 @@
     extends PlexusTestCase
 {
     /**
+     * Verify the expected results.
+     */
+    public void testEscapeHTML()
+    {
+        assertEquals( HtmlTools.escapeHTML( "" ), "" );
+        assertEquals( HtmlTools.escapeHTML( "<" ), "&lt;" );
+        assertEquals( HtmlTools.escapeHTML( ">" ), "&gt;" );
+        assertEquals( HtmlTools.escapeHTML( "&" ), "&amp;" );
+        assertEquals( HtmlTools.escapeHTML( "\"" ), "&quot;" );
+        assertEquals( HtmlTools.escapeHTML( "&amp;" ), "&amp;amp;" );
+    }
+
+    /**
      * Verify the awaited results
      */
     public void testEncodeId()



Mime
View raw message