X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=t%2Fload_plugins.t;h=40b11c7069fe3f526eeec3a0b1ec1ad89ace4fcf;hp=0115c8b80dc68f06737008b2e8f4e4e8be222730;hb=f85a85b0ba6ea4eca7346b4bb0d7b3ce960b8e92;hpb=6bba7e870f4052c929783c48e8598628c8eb078c diff --git a/t/load_plugins.t b/t/load_plugins.t old mode 100755 new mode 100644 index 0115c8b..40b11c7 --- a/t/load_plugins.t +++ b/t/load_plugins.t @@ -3,7 +3,7 @@ use strict; use warnings; use Test::More; -use Test::Warnings; +use if $ENV{AUTHOR_TESTING}, 'Test::Warnings'; use_ok('Devel::REPL'); @@ -54,16 +54,14 @@ for my $plugin_name (@plugins) { sub test_load_plugin { my ($plugin_name) = @_; my $test_name = "plugin $plugin_name loaded"; - eval "use Devel::REPL::Plugin::$plugin_name"; - unless($@) { - eval { $repl->load_plugin($plugin_name) }; - ok(!$@, $test_name); - } else { - SKIP: { - skip "could not eval plugin $plugin_name", 1; - } + + SKIP: { + eval "use Devel::REPL::Plugin::$plugin_name; 1" + or skip "could not eval plugin $plugin_name", 1; + + ok(eval { $repl->load_plugin($plugin_name); 1 }, $test_name) + or diag $@; } } done_testing; -