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