Add one more naughty test for base64; make encoding logic cleaner.
Jarkko Hietaniemi [Mon, 23 Apr 2001 17:30:40 +0000 (17:30 +0000)]
p4raw-id: //depot/perl@9795

t/lib/mimeb64.t

index b122552..7a61fe9 100644 (file)
@@ -5,12 +5,12 @@ BEGIN {
 
 use MIME::Base64;
 
-print "1..282\n";
+print "1..283\n";
 
 print "# Testing MIME::Base64-", $MIME::Base64::VERSION, "\n";
 
 BEGIN {
- if (ord('A') != 193) {
+ if (ord('A') == 41) {
   *ASCII = sub { return $_[0] };
  }
  else {
@@ -365,6 +365,7 @@ sub decodeTest
         ['YWFh====' =>  ASCII('aaa')],
         ['YQ'       =>  ASCII('a')],
         ['Y'        => ''],
+        ['x=='      => ''],
         [''         => ''],
         [undef()    => ''],
     );