summaryrefslogtreecommitdiff
path: root/lib/utf8.t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-04-03 19:15:33 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-03 19:15:33 +0000
commit475207295892c8d6f0f8cb39eddae4e2f1733f4f (patch)
tree12cd9df5eaeebbb20c120fb9ae559c7243fb7ff7 /lib/utf8.t
parente7cbefb8f35850373025fec8ebf4c27d47127348 (diff)
downloadperl-475207295892c8d6f0f8cb39eddae4e2f1733f4f.tar.gz
non-perlio robustness.
p4raw-id: //depot/perl@15714
Diffstat (limited to 'lib/utf8.t')
-rw-r--r--lib/utf8.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/utf8.t b/lib/utf8.t
index 19d88e53cf..acd64bfb21 100644
--- a/lib/utf8.t
+++ b/lib/utf8.t
@@ -1,9 +1,16 @@
#!./perl
+my $has_perlio;
+
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
+ unless ($has_perlio = find PerlIO::Layer 'perlio') {
+ print <<EOF;
+# Since you don't have perlio you might get failures with UTF-8 locales.
+EOF
+ }
}
# NOTE!
@@ -165,7 +172,7 @@ BANG
foreach (@tests) {
my ($why, $prog, $expect) = @$_;
open P, ">$progfile" or die "Can't open '$progfile': $!";
- binmode(P, ":bytes");
+ binmode(P, ":bytes") if $has_perlio;
print P $show, $prog, '; print $b'
or die "Print to 'progfile' failed: $!";
close P or die "Can't close '$progfile': $!";