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=0115c8b80dc68f06737008b2e8f4e4e8be222730;hp=e8b26df8d7f09ab7f1d92c175ff1b0c4806564b2;hb=6bba7e870f4052c929783c48e8598628c8eb078c;hpb=1680cce5b6c1c8d30dba643079fccb4c1833acaf diff --git a/t/load_plugins.t b/t/load_plugins.t index e8b26df..0115c8b 100755 --- a/t/load_plugins.t +++ b/t/load_plugins.t @@ -1,9 +1,9 @@ -#!/usr/bin/env perl -use FindBin qw($Bin); -use lib "$Bin/../t/lib"; +use strict; +use warnings; -use Test::More 'no_plan'; +use Test::More; +use Test::Warnings; use_ok('Devel::REPL'); @@ -39,13 +39,20 @@ Timing Turtles /; +# one $repl is shared: +# "Looks like the problem is that you can't open multiple instances of +# Term::ReadLine:Perl from the same object. I was able to correct this by +# changing the test to reuse the same Devel::REPL instance each time. This +# prevents the warning that causes the test to fail. I don't think this +# changes the spirit of the test, it's just a byproduct of how +# Term::ReadLine::Perl works." -- RT#84246 +my $repl = Devel::REPL->new; for my $plugin_name (@plugins) { test_load_plugin($plugin_name); } sub test_load_plugin { my ($plugin_name) = @_; - my $repl = Devel::REPL->new; my $test_name = "plugin $plugin_name loaded"; eval "use Devel::REPL::Plugin::$plugin_name"; unless($@) { @@ -58,4 +65,5 @@ sub test_load_plugin { } } -1; +done_testing; +