#!./perl
my $PERLIO;
BEGIN {
chdir 't' if -d 't';
print "1..0 # Skip: not perlio\n";
exit 0;
}
eval 'use Encode';
print "1..0 # miniperl cannot load Encode\n";
exit 0;
}
# Makes testing easier.
# We are not prepared for anything else.
exit 0;
}
}
use Config;
print <<__EOH__;
# PERLIO = $PERLIO
# DOSISH = $DOSISH
# NONSTDIO = $NONSTDIO
# FASTSTDIO = $FASTSTDIO
__EOH__
# FIXME - more of these could be tested without Encode or full perl
sub check {
# An interesting dance follows where we try to make the following
# IO layer stack setups to compare equal:
#
# PERLIO UNIX-like DOS-like
#
# unset / "" unix perlio / stdio [1] unix crlf
# stdio unix perlio / stdio [1] stdio
# perlio unix perlio unix perlio
# mmap unix mmap unix mmap
#
# [1] "stdio" if Configure found out how to do "fast stdio" (depends
# on the stdio implementation) and in Perl 5.8, otherwise "unix perlio"
#
# Get rid of "unix".
# Change expectations.
} else {
}
if @$result >= 2 &&
if @$result >= 2 &&
}
# 5 tests potentially skipped because
# DOSISH systems already have a CRLF layer
# which will make new ones not stick.
}
for (my $i = 0; $i < $n; $i++) {
my $j = $expected->[$i];
} else {
}
}
}
[ "stdio" ],
"STDIN");
"open :crlf");
":encoding(sjis)");
":pop");
[ "stdio" ],
":raw");
":utf8");
[ "stdio" ],
":bytes");
":encoding(utf8)");
":raw:crlf");
# 7 tests potentially skipped.
# Get rid of the args and the flags.
":raw:encoding(latin1)");
}
[ "stdio" ],
"binmode");
close F;
{
"use open IN");
"use open OUT");
close F;
close G;
}
}