You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2011/05/18 14:33:24 UTC

svn commit: r1124218 - /commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java

Author: ggregory
Date: Wed May 18 12:33:24 2011
New Revision: 1124218

URL: http://svn.apache.org/viewvc?rev=1124218&view=rev
Log:
Document [CODEC-121]

Modified:
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java?rev=1124218&r1=1124217&r2=1124218&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java (original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java Wed May 18 12:33:24 2011
@@ -24,6 +24,7 @@ import static org.junit.Assert.fail;
 import org.apache.commons.codec.CharEncoding;
 import org.apache.commons.codec.DecoderException;
 import org.apache.commons.codec.EncoderException;
+import org.junit.Ignore;
 import org.junit.Test;
 
 /**
@@ -262,4 +263,32 @@ public class QuotedPrintableCodecTest {
         String encoded2 = qpcodec.encode(plain);
         assertEquals(encoded1, encoded2);
     }
+
+    @Test
+    @Ignore
+    /**
+     * The QuotedPrintableCodec documentation states that this is not supported.
+     *  
+     * @throws Exception
+     * @see <a href="https://issues.apache.org/jira/browse/CODEC-121">CODEC-121</a>
+     */
+    public void testSoftLineBreakDecode() throws Exception {
+        String qpdata = "If you believe that truth=3Dbeauty, then surely=20=\r\nmathematics is the most beautiful branch of philosophy.";
+        String expected = "If you believe that truth=beauty, then surely mathematics is the most beautiful branch of philosophy.";
+        assertEquals(expected, new QuotedPrintableCodec().decode(qpdata));
+    }
+
+    @Test
+    @Ignore
+    /**
+     * The QuotedPrintableCodec documentation states that this is not supported.
+     *  
+     * @throws Exception
+     * @see <a href="https://issues.apache.org/jira/browse/CODEC-121">CODEC-121</a>
+     */
+    public void testSoftLineBreakEncode() throws Exception {
+        String qpdata = "If you believe that truth=3Dbeauty, then surely=20=\r\nmathematics is the most beautiful branch of philosophy.";
+        String expected = "If you believe that truth=beauty, then surely mathematics is the most beautiful branch of philosophy.";
+        assertEquals(qpdata, new QuotedPrintableCodec().encode(expected));
+    }
 }