Commit | Line | Data |
2556f95e |
1 | #!perl |
2 | # ioleaks.t |
3 | |
4 | use strict; |
5 | use warnings; |
6 | use Test::More 'no_plan'; |
7 | |
8 | # :unix -> not ok |
9 | # :stdio -> not ok |
10 | # :perlio -> ok |
11 | # :crlf -> ok |
12 | |
2376d97d |
13 | TODO: { |
14 | local $TODO = "[perl #56644] PerlIO resource leaks on open() and then :pop in :unix and :stdio"; |
15 | foreach my $layer(qw(:unix :stdio :perlio :crlf)){ |
16 | my $base_fd = do{ open my $in, '<', $0 or die $!; fileno $in }; |
2556f95e |
17 | |
2376d97d |
18 | for(1 .. 3){ |
19 | open my $fh, "<$layer", $0 or die $!; |
2556f95e |
20 | |
2376d97d |
21 | is fileno($fh), $base_fd, $layer; |
22 | binmode $fh, ':pop'; |
23 | } |
24 | } |
2556f95e |
25 | } |
26 | |