projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Re: [perl #56644] PerlIO resource leaks on open() and then :pop in :unix and :stdio
[p5sagit/p5-mst-13.2.git]
/
ext
/
PerlIO
/
t
/
ioleaks.t
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
13
foreach my $layer(qw(:unix :stdio :perlio :crlf)){
14
my $base_fd = do{ open my $in, '<', $0 or die $!; fileno $in };
15
16
for(1 .. 3){
17
open my $fh, "<$layer", $0 or die $!;
18
19
is fileno($fh), $base_fd, $layer;
20
binmode $fh, ':pop';
21
}
22
}
23