changelog entry for release
[p5sagit/Devel-REPL.git] / t / load_plugins.t
1 use strict;
2 use warnings;
3
4 use Test::More;
5 use Test::Warnings;
6
7 use_ok('Devel::REPL');
8
9 my @plugins = qw/
10 B::Concise
11 Colors
12 Commands
13 Completion
14 CompletionDriver::Globals
15 CompletionDriver::INC
16 CompletionDriver::Keywords
17 CompletionDriver::LexEnv
18 CompletionDriver::Methods
19 CompletionDriver::Turtles
20 DDC
21 DDS
22 DumpHistory
23 FancyPrompt
24 FindVariable
25 History
26 Interrupt
27 LexEnv
28 MultiLine::PPI
29 Nopaste
30 OutputCache
31 PPI
32 Packages
33 Peek
34 ReadLineHistory
35 Refresh
36 ShowClass
37 Timing
38 Turtles
39 /;
40
41 for my $plugin_name (@plugins) {
42     test_load_plugin($plugin_name);
43 }
44
45 sub test_load_plugin {
46     my ($plugin_name) = @_;
47     my $repl = Devel::REPL->new;
48     my $test_name = "plugin $plugin_name loaded";
49     eval "use Devel::REPL::Plugin::$plugin_name";
50     unless($@) {
51         eval { $repl->load_plugin($plugin_name) };
52         ok(!$@, $test_name);
53     } else {
54         SKIP: {
55                 skip "could not eval plugin $plugin_name", 1;
56         }
57     }
58 }
59
60 done_testing;
61