Upgrade to IO 1.22 from gbarr
[p5sagit/p5-mst-13.2.git] / ext / IO / t / io_file.t
index 22d177e..546c611 100755 (executable)
@@ -1,10 +1,15 @@
 #!./perl -w
 
-BEGIN { chdir 't' if -d 't'; }
+BEGIN {
+    unless(grep /blib/, @INC) {
+       chdir 't' if -d 't';
+       @INC = '../lib';
+    }
+}
 
 use strict;
-use lib '../lib';
-use Test::More tests => ($^O =~ /MSWin32/ ? 9 : 6);
+require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl");
+plan(tests => ($^O =~ /MSWin32/ ? 9 : 6));
 
 my $Class       = 'IO::File';
 my $All_Chars   = join '', "\r\n", map( chr, 1..255 ), "zzz\n\r";