1#!./perl 2 3BEGIN { 4 chdir 't' if -d 't'; 5 @INC = '../lib'; 6 require './test.pl'; 7 skip_all_if_miniperl("miniperl can't load IO::File"); 8} 9 10$| = 1; 11use warnings; 12use Config; 13 14plan 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} 27