File tree Expand file tree Collapse file tree
src/test/org/apache/commons/codec/net Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424import org .apache .commons .codec .CharEncoding ;
2525import org .apache .commons .codec .DecoderException ;
2626import org .apache .commons .codec .EncoderException ;
27+ import org .junit .Ignore ;
2728import org .junit .Test ;
2829
2930/**
@@ -262,4 +263,32 @@ public void testDefaultEncoding() throws Exception {
262263 String encoded2 = qpcodec .encode (plain );
263264 assertEquals (encoded1 , encoded2 );
264265 }
266+
267+ @ Test
268+ @ Ignore
269+ /**
270+ * The QuotedPrintableCodec documentation states that this is not supported.
271+ *
272+ * @throws Exception
273+ * @see <a href="https://issues.apache.org/jira/browse/CODEC-121">CODEC-121</a>
274+ */
275+ public void testSoftLineBreakDecode () throws Exception {
276+ String qpdata = "If you believe that truth=3Dbeauty, then surely=20=\r \n mathematics is the most beautiful branch of philosophy." ;
277+ String expected = "If you believe that truth=beauty, then surely mathematics is the most beautiful branch of philosophy." ;
278+ assertEquals (expected , new QuotedPrintableCodec ().decode (qpdata ));
279+ }
280+
281+ @ Test
282+ @ Ignore
283+ /**
284+ * The QuotedPrintableCodec documentation states that this is not supported.
285+ *
286+ * @throws Exception
287+ * @see <a href="https://issues.apache.org/jira/browse/CODEC-121">CODEC-121</a>
288+ */
289+ public void testSoftLineBreakEncode () throws Exception {
290+ String qpdata = "If you believe that truth=3Dbeauty, then surely=20=\r \n mathematics is the most beautiful branch of philosophy." ;
291+ String expected = "If you believe that truth=beauty, then surely mathematics is the most beautiful branch of philosophy." ;
292+ assertEquals (qpdata , new QuotedPrintableCodec ().encode (expected ));
293+ }
265294}
You can’t perform that action at this time.
0 commit comments