1898184e3Ssthen#!./perl 2898184e3Ssthen 3898184e3SsthenBEGIN { 4898184e3Ssthen chdir 't' if -d 't'; 5898184e3Ssthen require './test.pl'; 6*5759b3d2Safresh1 set_up_inc('../lib'); 7898184e3Ssthen skip_all_if_miniperl("miniperl can't load IO::File"); 8898184e3Ssthen} 9898184e3Ssthen 10898184e3Ssthen$| = 1; 11898184e3Ssthenuse warnings; 12898184e3Ssthenuse Config; 13898184e3Ssthen 14898184e3Ssthenplan tests => 3; 15898184e3Ssthen 16898184e3Ssthen# this is essentially the same as a test on a lexical filehandle in 17898184e3Ssthen# t/io/open.t, but done in a separate test process against a standard 18898184e3Ssthen# filehandle 19898184e3Ssthen 20898184e3Ssthen# check that we can call methods on filehandles auto-magically 21898184e3Ssthen# and have IO::File loaded for us 22898184e3Ssthen{ 23898184e3Ssthen is( $INC{'IO/File.pm'}, undef, "IO::File not loaded" ); 24898184e3Ssthen ok( eval { STDOUT->autoflush(1); 1 }, 'STDOUT->autoflush(1) lives' ); 25898184e3Ssthen ok( $INC{'IO/File.pm'}, "IO::File now loaded" ); 26898184e3Ssthen} 27