summaryrefslogtreecommitdiff
path: root/t/io
diff options
context:
space:
mode:
authorPrymmer/Kahn <pvhp@best.com>2001-05-02 16:56:13 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-03 12:58:33 +0000
commit375927eb17fc2e1784e0297bc64d5a9f12bd0496 (patch)
treed06326447cda2d4d15d28012b0dd431ddcfafb9f /t/io
parent6b29183e8fb33dcb5d7283f31de030d13f3df8c6 (diff)
downloadperl-375927eb17fc2e1784e0297bc64d5a9f12bd0496.tar.gz
fix handling of $Config{variables} in io/fflush.t
Message-ID: <Pine.BSF.4.21.0105022353380.24421-100000@shell8.ba.best.com> p4raw-id: //depot/perl@9972
Diffstat (limited to 't/io')
-rw-r--r--t/io/fflush.t12
1 files changed, 9 insertions, 3 deletions
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-$$";