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