X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;ds=sidebyside;f=t%2F01-import.t;h=35c8d5ca6469819d8004e886f9ce8f59a88ccf21;hb=dee850ba2915663035bfd2b27b2d412e370f4a26;hp=d612ed4ff607030258275327f90d2615b35186dc;hpb=c966261ac55fcb079dfc1bf42b1152b4bb71bd0b;p=perl%2Fmodules%2FTest-Leaner.git diff --git a/t/01-import.t b/t/01-import.t index d612ed4..35c8d5c 100644 --- a/t/01-import.t +++ b/t/01-import.t @@ -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); @@ -13,7 +16,6 @@ require Test::Leaner; my @syms = qw< plan - skip_all skip done_testing pass @@ -21,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 $_"; }