]> git.vpit.fr Git - perl/modules/Test-Leaner.git/blobdiff - t/01-import.t
Stop failing on unlike() prototype with old Test::More
[perl/modules/Test-Leaner.git] / t / 01-import.t
index 9fe04df4ee1a6b15fba5a885fb87d180f8f5e426..35c8d5ca6469819d8004e886f9ce8f59a88ccf21 100644 (file)
@@ -32,8 +32,15 @@ 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 $_";
- 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 $_";
 }