Add one more naughty test for base64; make encoding logic cleaner.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 23 Apr 2001 17:30:40 +0000 (17:30 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 23 Apr 2001 17:30:40 +0000 (17:30 +0000)
p4raw-id: //depot/perl@9795

t/lib/mimeb64.t

index b1225521f3d42cd501dd8623866d55dc97ff9995..7a61fe957692153df8ce812e7c61b7ff584ba891 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()    => ''],
     );