Akron | aaf4a83 | 2023-01-12 17:26:20 +0100 | [diff] [blame] | 1 | use Test::More; |
| 2 | use Test::Mojo; |
| 3 | use Test::Output; |
| 4 | |
| 5 | my $script = `sh -c 'command -v conllu2korapxml'`; |
| 6 | |
| 7 | if ($script eq '') { |
| 8 | plan skip_all => "KorAP::XML::Krill is not installed"; |
| 9 | exit; |
| 10 | }; |
| 11 | |
| 12 | my $t = Test::Mojo->new(Kalamar => { |
| 13 | Kalamar => { |
| 14 | plugins => ['KorAPXML2CoNLLU'] |
| 15 | } |
| 16 | }); |
| 17 | my $app = $t->app; |
| 18 | my $cmds = $app->commands; |
| 19 | ok(grep/::KorAPXML2CoNLLU/, @{$cmds->namespaces}, 'Namespace is set'); |
| 20 | stdout_like( |
| 21 | sub { |
| 22 | $cmds->run('conllu2korapxml','-v'); |
| 23 | }, |
| 24 | qr{zca15\.tree_tagger\.conllu} |
| 25 | ); |
| 26 | stdout_like( |
| 27 | sub { |
| 28 | $cmds->run('korapxml2conllu','-v'); |
| 29 | }, |
| 30 | qr{zca15\.tree_tagger\.zip} |
| 31 | ); |
| 32 | done_testing; |
| 33 | 1; |