Re: [PATCH: Configure/NDBM_File] Add prototype detection for NDBM header files
[p5sagit/p5-mst-13.2.git] / ext / PerlIO / t / ioleaks.t
CommitLineData
2556f95e 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
13foreach 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