This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/lib/croak/regcomp: Fix up for EBCDIC
[perl5.git] / t / lib / deprecate.t
index 274a7b6..09b258f 100644 (file)
@@ -1,13 +1,14 @@
+#!perl -w
 use strict;
 
 BEGIN {
-       chdir 't' if -d 't';
-       @INC = qw(../lib);
+    chdir 't' if -d 't';
+    require './test.pl';
 }
 use File::Copy ();
 use File::Path ();
 use File::Spec ();
-use Test::More tests => 10;
+plan(tests => 10);
 
 my $test_dir = File::Spec->catdir(qw(lib deprecate));
 chdir $test_dir or die "Can't chdir $test_dir";
@@ -31,6 +32,7 @@ our %tests = (
        sitearchexp     => 0,
 );
 
+no warnings 'once';
 local %deprecate::Config = (%libdir);
 
 my $module = 'Deprecated.pm';
@@ -56,7 +58,7 @@ for my $lib (sort keys %tests) {
     }
 
     delete $INC{$module};
-    unlink $pm;
+    unlink_all $pm;
 }
 
 my $sub_dir = 'Optionally';
@@ -82,7 +84,7 @@ for my $lib (sort keys %tests) {
     }
 
     delete $INC{"$sub_dir/$module"};
-    unlink $pm;
+    unlink_all $pm;
 }
 
 END { File::Path::remove_tree('lib') }