From: Prymmer/Kahn Date: Wed, 2 May 2001 23:56:13 +0000 (-0700) Subject: fix handling of $Config{variables} in io/fflush.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=375927eb17fc2e1784e0297bc64d5a9f12bd0496;p=p5sagit%2Fp5-mst-13.2.git fix handling of $Config{variables} in io/fflush.t Message-ID: p4raw-id: //depot/perl@9972 --- diff --git a/t/io/fflush.t b/t/io/fflush.t index 8c6bd08..2c7f7bb 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-$$";