This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mktables: Calculate \p{Assigned} earlier in build
[perl5.git] / t / io / fflush.t
index 056517f..0bbfa54 100644 (file)
@@ -19,20 +19,13 @@ use strict;
 # it here too or expect test gratuitous test failures.
 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..7\n";
-} else {
-    if ($fflushall) {
-       print "1..7\n";
-    } else {
-       print "1..0 # Skip: fflush(NULL) or equivalent not available\n";
-        exit;
-    }
-}
+skip_all('fflush(NULL) or equivalent not available')
+    unless $useperlio || $fflushNULL || $fflushall;
+
+plan(tests => 7);
 
 my $runperl = $^X =~ m/\s/ ? qq{"$^X"} : $^X;
 $runperl .= qq{ "-I../lib"};
@@ -135,3 +128,4 @@ while (<$CMD>) {
 }
 close $CMD;
 $t += 3;
+curr_test($t);