blob: f217fb8cdf8dd81f95362d3713da06b99b94b193 [file] [log] [blame]
Akronaaf4a832023-01-12 17:26:20 +01001use Test::More;
2use Test::Mojo;
3use Test::Output;
Akrondf92c832023-03-29 11:05:37 +02004use Kalamar::Plugin::KorAPXML2CoNLLU;
Akronaaf4a832023-01-12 17:26:20 +01005
Akrondf92c832023-03-29 11:05:37 +02006unless (Kalamar::Plugin::KorAPXML2CoNLLU::check_existence()) {
7 plan skip_all => "KorAP::XML::ConLLU is not installed";
Akronaaf4a832023-01-12 17:26:20 +01008 exit;
9};
10
11my $t = Test::Mojo->new(Kalamar => {
12 Kalamar => {
13 plugins => ['KorAPXML2CoNLLU']
14 }
15});
16my $app = $t->app;
17my $cmds = $app->commands;
18ok(grep/::KorAPXML2CoNLLU/, @{$cmds->namespaces}, 'Namespace is set');
19stdout_like(
20 sub {
21 $cmds->run('conllu2korapxml','-v');
22 },
23 qr{zca15\.tree_tagger\.conllu}
24);
25stdout_like(
26 sub {
27 $cmds->run('korapxml2conllu','-v');
28 },
29 qr{zca15\.tree_tagger\.zip}
30);
31done_testing;
321;