Commit | Line | Data |
---|---|---|
15e6cdd9 DG |
1 | #!./perl |
2 | ||
3 | BEGIN { | |
4 | chdir 't' if -d 't'; | |
5 | @INC = '../lib'; | |
6 | require './test.pl'; | |
c82d0e1e | 7 | skip_all_if_miniperl("miniperl can't load IO::File"); |
15e6cdd9 DG |
8 | } |
9 | ||
10 | $| = 1; | |
11 | use warnings; | |
12 | use Config; | |
13 | ||
14 | plan tests => 3; | |
15 | ||
16 | # this is essentially the same as a test on a lexical filehandle in | |
17 | # t/io/open.t, but done in a separate test process against a standard | |
18 | # filehandle | |
19 | ||
20 | # check that we can call methods on filehandles auto-magically | |
21 | # and have IO::File loaded for us | |
22 | { | |
23 | is( $INC{'IO/File.pm'}, undef, "IO::File not loaded" ); | |
24 | ok( eval { STDOUT->autoflush(1); 1 }, 'STDOUT->autoflush(1) lives' ); | |
25 | ok( $INC{'IO/File.pm'}, "IO::File now loaded" ); | |
26 | } |