From: Jarkko Hietaniemi Date: Sun, 2 Feb 2003 12:49:13 +0000 (+0000) Subject: minitest wasn't working. (The $^X /miniperl/ test in X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7aae9294ce1130ca3d4d220d2871f86359f3f256;p=p5sagit%2Fp5-mst-13.2.git minitest wasn't working. (The $^X /miniperl/ test in io/crlf.t didn't work in Tru64, $^X was "./perl", used the same 'eval q/use .../' trick everywhere.) p4raw-id: //depot/perl@18622 --- diff --git a/t/io/crlf.t b/t/io/crlf.t index 96f7ed7..5f879f2 100644 --- a/t/io/crlf.t +++ b/t/io/crlf.t @@ -32,7 +32,9 @@ if (find PerlIO::Layer 'perlio') { SKIP: { - if ($^X =~ /\bminiperl\b/) { skip(q/miniperl can't load PerlIO layers/) } + eval 'use PerlIO::scalar'; + skip(q/miniperl cannnot load PerlIO::scalar/) + if $@ =~ /dynamic loading not available/; my $fcontents = join "", map {"$_\r\n"} "a".."zzz"; open my $fh, "<:crlf", \$fcontents; local $/ = "xxx"; diff --git a/t/uni/tr_7jis.t b/t/uni/tr_7jis.t index 360ce1c..894ff4c 100644 --- a/t/uni/tr_7jis.t +++ b/t/uni/tr_7jis.t @@ -23,6 +23,11 @@ BEGIN { print "1..0 # Skip: PerlIO required\n"; exit 0; } + eval 'use Encode'; + if ($@ =~ /dynamic loading not available/) { + print "1..0 # Skip: no dynamic loading, no Encode\n"; + exit 0; + } $| = 1; } diff --git a/t/uni/tr_eucjp.t b/t/uni/tr_eucjp.t index e13acab..6958f46 100644 --- a/t/uni/tr_eucjp.t +++ b/t/uni/tr_eucjp.t @@ -22,6 +22,11 @@ BEGIN { print "1..0 # Skip: PerlIO required\n"; exit 0; } + eval 'use Encode'; + if ($@ =~ /dynamic loading not available/) { + print "1..0 # Skip: no dynamic loading, no Encode\n"; + exit 0; + } $| = 1; } diff --git a/t/uni/tr_sjis.t b/t/uni/tr_sjis.t index 0f4a72b..732eb1a 100644 --- a/t/uni/tr_sjis.t +++ b/t/uni/tr_sjis.t @@ -22,6 +22,11 @@ BEGIN { print "1..0 # Skip: PerlIO required\n"; exit 0; } + eval 'use Encode'; + if ($@ =~ /dynamic loading not available/) { + print "1..0 # Skip: no dynamic loading, no Encode\n"; + exit 0; + } $| = 1; } diff --git a/t/uni/tr_utf8.t b/t/uni/tr_utf8.t index 12f3516..e623909 100644 --- a/t/uni/tr_utf8.t +++ b/t/uni/tr_utf8.t @@ -23,6 +23,11 @@ BEGIN { print "1..0 # Skip: PerlIO required\n"; exit 0; } + eval 'use Encode'; + if ($@ =~ /dynamic loading not available/) { + print "1..0 # Skip: no dynamic loading, no Encode\n"; + exit 0; + } $| = 1; }