Akron | 653461e | 2021-09-20 13:58:08 +0200 | [diff] [blame] | 1 | use Test::More; |
| 2 | use Test::Mojo; |
| 3 | use Test::Output; |
| 4 | |
| 5 | eval { |
| 6 | require KorAP::XML::TEI; |
| 7 | 1; |
| 8 | } || do { |
| 9 | plan skip_all => "KorAP::XML::TEI is not installed"; |
| 10 | }; |
| 11 | |
| 12 | my $t = Test::Mojo->new(Kalamar => { |
| 13 | Kalamar => { |
| 14 | plugins => ['Tei2KorAPXML'] |
| 15 | } |
| 16 | }); |
| 17 | |
| 18 | my $app = $t->app; |
| 19 | |
| 20 | my $cmds = $app->commands; |
| 21 | |
| 22 | ok(grep/::Tei2KorAPXML/, @{$cmds->namespaces}, 'Namespace is set'); |
| 23 | |
| 24 | stdout_like( |
| 25 | sub { |
| 26 | $cmds->run('tei2korapxml','-v'); |
| 27 | }, |
| 28 | qr{cat corpus\.i5\.xml} |
| 29 | ); |
| 30 | |
| 31 | done_testing; |
| 32 | |
| 33 | 1; |