You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2008/06/20 02:45:43 UTC

svn commit: r669749 - /commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java

Author: sebb
Date: Thu Jun 19 17:45:42 2008
New Revision: 669749

URL: http://svn.apache.org/viewvc?rev=669749&view=rev
Log:
Some more lineSeparator tests

Modified:
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java?rev=669749&r1=669748&r2=669749&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java (original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java Thu Jun 19 17:45:42 2008
@@ -698,6 +698,12 @@
         } catch (IllegalArgumentException ignored){
             
         }
+        try {
+            base64 = new Base64(64,new byte[]{'='});
+            fail("Should have rejected attempt to use '=' as a line separator");
+        } catch (IllegalArgumentException ignored){
+            
+        }
         base64 = new Base64(64,new byte[]{'$'}); // OK
         try {
             base64 = new Base64(64,new byte[]{'A','$'});
@@ -705,6 +711,7 @@
         } catch (IllegalArgumentException ignored){
             
         }
+        base64 = new Base64(64,new byte[]{' ','$','\n','\r','\t'}); // OK
     }
     // -------------------------------------------------------- Private Methods