This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #56644] TODO was too severe. Only :unix :stdio were failing
[perl5.git] / t / io / perlio_leaks.t
CommitLineData
2556f95e
GF
1#!perl
2# ioleaks.t
3
4use strict;
5use warnings;
6use Test::More 'no_plan';
7
8# :unix -> not ok
9# :stdio -> not ok
10# :perlio -> ok
11# :crlf -> ok
12
2376d97d 13TODO: {
2376d97d
SP
14 foreach my $layer(qw(:unix :stdio :perlio :crlf)){
15 my $base_fd = do{ open my $in, '<', $0 or die $!; fileno $in };
2556f95e 16
2376d97d 17 for(1 .. 3){
776e8d8c
DM
18 local $TODO;
19 if ($_ > 1 && $layer =~ /^:(unix|stdio)$/) {
20 $TODO = "[perl #56644] PerlIO resource leaks on open() and then :pop in :unix and :stdio"
21 }
22 open my $fh, "<$layer", $0 or die $!;
2556f95e 23
776e8d8c
DM
24 is fileno($fh), $base_fd, $layer;
25 binmode $fh, ':pop';
2376d97d
SP
26 }
27 }
2556f95e
GF
28}
29