From 375927eb17fc2e1784e0297bc64d5a9f12bd0496 Mon Sep 17 00:00:00 2001 From: Prymmer/Kahn Date: Wed, 2 May 2001 16:56:13 -0700 Subject: fix handling of $Config{variables} in io/fflush.t Message-ID: p4raw-id: //depot/perl@9972 --- t/io/fflush.t | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 't/io') diff --git a/t/io/fflush.t b/t/io/fflush.t index 8c6bd080a1..2c7f7bbc97 100644 --- a/t/io/fflush.t +++ b/t/io/fflush.t @@ -16,10 +16,16 @@ use strict; # This attempts to mirror the #ifdef forest found in perl.h so that we # know when to run these tests. If that forest ever changes, change # it here too or expect test gratuitous test failures. -if ($Config{useperlio} || $Config{fflushNULL} || $Config{d_sfio}) { +my $useperlio = defined $Config{useperlio} ? $Config{useperlio} eq 'define' ? 1 : 0 : 0; +my $fflushNULL = defined $Config{fflushNULL} ? $Config{fflushNULL} eq 'define' ? 1 : 0 : 0; +my $d_sfio = defined $Config{d_sfio} ? $Config{d_sfio} eq 'define' ? 1 : 0 : 0; +my $fflushall = defined $Config{fflushall} ? $Config{fflushall} eq 'define' ? 1 : 0 : 0; +my $d_fork = defined $Config{d_fork} ? $Config{d_fork} eq 'define' ? 1 : 0 : 0; + +if ($useperlio || $fflushNULL || $d_sfio) { print "1..4\n"; } else { - if ($Config{fflushall}) { + if ($fflushall) { print "1..4\n"; } else { print "1..0 # Skip: fflush(NULL) or equivalent not available\n"; @@ -66,7 +72,7 @@ push @delete, "ff-prog"; $| = 0; # we want buffered output # Test flush on fork/exec -if ($Config{d_fork} ne "define") { +if (!$d_fork) { print "ok 1 # skipped: no fork\n"; } else { my $f = "ff-fork-$$"; -- cgit v1.2.1