summaryrefslogtreecommitdiff
path: root/t/io/layers.t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-04-15 16:36:32 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-04-15 16:36:32 +0000
commit52f0369265fafcf89f4f4e431133709cca4eadc5 (patch)
tree79d3d6c95baf8c8136a811f4a588532f90a0ebe7 /t/io/layers.t
parent1f6030891eeaa38c79c7f0d2b45aa8cde2eb62b5 (diff)
downloadperl-52f0369265fafcf89f4f4e431133709cca4eadc5.tar.gz
Handle PERLIO=stdio, PERLIO=perlio, PERLIO=mmap, and no PERLIO.
p4raw-id: //depot/perl@19223
Diffstat (limited to 't/io/layers.t')
-rw-r--r--t/io/layers.t8
1 files changed, 5 insertions, 3 deletions
diff --git a/t/io/layers.t b/t/io/layers.t
index 8b84cf5799..55be7cf99d 100644
--- a/t/io/layers.t
+++ b/t/io/layers.t
@@ -14,6 +14,8 @@ plan tests => 43;
use Config;
+my $NONSTDIO = exists $ENV{PERLIO} && $ENV{PERLIO} ne 'stdio';
+
SKIP: {
skip("This perl does not have Encode", 43)
unless " $Config{extensions} " =~ / Encode /;
@@ -22,11 +24,11 @@ SKIP: {
my ($result, $expected, $id) = @_;
my $n = scalar @$expected;
is($n, scalar @$expected, "$id - layers = $n");
- if ($ENV{PERLIO}) {
+ if ($NONSTDIO) {
# Get rid of "unix" and similar OS-specific low lever layer.
shift(@$result);
# Change expectations.
- $expected->[0] = "perlio" if $expected->[0] eq "stdio";
+ $expected->[0] = $ENV{PERLIO} if $expected->[0] eq "stdio";
}
for (my $i = 0; $i < $n; $i++) {
my $j = $expected->[$i];
@@ -97,7 +99,7 @@ SKIP: {
my @results = PerlIO::get_layers(F, details => 1);
# Get rid of "unix" and undef.
- splice(@results, 0, 2) if $ENV{PERLIO};
+ splice(@results, 0, 2) if $NONSTDIO;
check([ @results ],
[ "stdio", undef, sub { $_[0] > 0 },