]> git.vpit.fr Git - perl/modules/Test-Leaner.git/blobdiff - t/01-import.t
Silence ugly 'redefined' warnings in t/01-import.t with old Test::More
[perl/modules/Test-Leaner.git] / t / 01-import.t
index 3b42068d7fb9cb90ba3775bc76015583df607ed0..9027e9963135acad44277f60eceb8bfa5ef44d1a 100644 (file)
@@ -5,7 +5,10 @@ use warnings;
 
 use Test::More ();
 
-BEGIN { *tm_is = \&Test::More::is }
+BEGIN {
+ delete $ENV{PERL_TEST_LEANER_USES_TEST_MORE};
+ *tm_is = \&Test::More::is;
+}
 
 Test::More::plan(tests => 2 * 15);
 
@@ -29,6 +32,10 @@ my @syms = qw<
  BAIL_OUT
 >;
 
+unless ($Test::More::VERSION > 0.51) {
+ delete $main::{$_} for @syms;
+}
+
 for (@syms) {
  eval { Test::Leaner->import(import => [ $_ ]) };
  tm_is $@,            '',                          "import $_";