From: Dan Kogai Date: Mon, 8 Apr 2002 06:19:29 +0000 (+0900) Subject: [MIME::Base64 patch] t/base64.t fix X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=237517034d704612306fe465c4c96035376e05f5;p=p5sagit%2Fp5-mst-13.2.git [MIME::Base64 patch] t/base64.t fix Message-Id: <25BF9A84-4A6D-11D6-9F9F-00039301D480@dan.co.jp> p4raw-id: //depot/perl@15791 --- diff --git a/ext/MIME/Base64/t/base64.t b/ext/MIME/Base64/t/base64.t index 7a61fe9..fdbe88f 100644 --- a/ext/MIME/Base64/t/base64.t +++ b/ext/MIME/Base64/t/base64.t @@ -1,8 +1,11 @@ BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + if ($ENV{'PERL_CORE'}){ + chdir 't'; + unshift @INC, '../lib'; + } } +use strict; use MIME::Base64; print "1..283\n"; @@ -10,7 +13,7 @@ print "1..283\n"; print "# Testing MIME::Base64-", $MIME::Base64::VERSION, "\n"; BEGIN { - if (ord('A') == 41) { + if (ord('A') == 0x41) { *ASCII = sub { return $_[0] }; } else { @@ -19,7 +22,11 @@ BEGIN { } } -$testno = 1; +my $testno = 1; +# instead of "for my $test (...)" , which is my preference. +# Not sure which perl version has started supporting. MIME::Base64 +# was supposed to work with very old perl5, right? +my $test; encodeTest(); decodeTest();