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