]> git.vpit.fr Git - perl/modules/Test-Leaner.git/blobdiff - t/01-import.t
Bump copyright year
[perl/modules/Test-Leaner.git] / t / 01-import.t
index 55f581decb0eef5e953fb0d829c691d0634ad55f..35c8d5ca6469819d8004e886f9ce8f59a88ccf21 100644 (file)
@@ -5,9 +5,12 @@ 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 * 14);
+Test::More::plan(tests => 2 * 15);
 
 require Test::Leaner;
 
@@ -20,16 +23,24 @@ my @syms = qw<
  ok
  is
  isnt
- cmp_ok
  like
  unlike
+ cmp_ok
+ is_deeply
  diag
  note
  BAIL_OUT
 >;
 
+unless ($Test::More::VERSION > 0.51) {
+ delete $main::{$_} for @syms;
+}
+
 for (@syms) {
  eval { Test::Leaner->import(import => [ $_ ]) };
- tm_is $@,            '',                          "import $_";
- tm_is prototype($_), prototype("Test::More::$_"), "prototype $_";
+ tm_is $@, '', "import $_";
+ my $proto = ($_ eq 'unlike' and $Test::More::VERSION < 0.4802)
+             ? '$$;$'
+             : prototype("Test::More::$_");
+ tm_is prototype($_), $proto, "prototype $_";
 }