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