This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make utf8::encode respect magic
[perl5.git] / t / io / iofile.t
CommitLineData
15e6cdd9
DG
1#!./perl
2
3BEGIN {
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;
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}