Akron | 6227fba | 2021-09-20 14:21:41 +0200 | [diff] [blame] | 1 | use Test::More; |
| 2 | use Test::Mojo; |
| 3 | use Test::Output; |
| 4 | eval { |
| 5 | require KorAP::XML::Krill; |
| 6 | 1; |
| 7 | } || do { |
| 8 | plan skip_all => "KorAP::XML::Krill is not installed"; |
| 9 | }; |
| 10 | my $t = Test::Mojo->new(Kalamar => { |
| 11 | Kalamar => { |
| 12 | plugins => ['KorAPXML2Krill'] |
| 13 | } |
| 14 | }); |
| 15 | my $app = $t->app; |
| 16 | my $cmds = $app->commands; |
| 17 | ok(grep/::KorAPXML2Krill/, @{$cmds->namespaces}, 'Namespace is set'); |
| 18 | stdout_like( |
| 19 | sub { |
| 20 | $cmds->run('korapxml2krill','-v'); |
| 21 | }, |
| 22 | qr{\[archive\|extract\]} |
| 23 | ); |
| 24 | done_testing; |
| 25 | 1; |