blob: 7e6b8f738bb8bfd59f6aaa43006d2a68c12894ff [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
Akrond77eefe2024-08-26 14:01:09 +020011use_ok('Log::Any::Adapter::Stderr');
12use_ok('Log::Any::Adapter::Stdout');
13use_ok('Log::Any::Adapter::Null');
14use_ok('Log::Any::Adapter::Multiplex');
15use_ok('Log::Any::Adapter::Syslog');
16use_ok('Log::Any::Adapter::Test');
17
Akronaaf4a832023-01-12 17:26:20 +010018my $t = Test::Mojo->new(Kalamar => {
19 Kalamar => {
20 plugins => ['KorAPXML2CoNLLU']
21 }
22});
23my $app = $t->app;
24my $cmds = $app->commands;
25ok(grep/::KorAPXML2CoNLLU/, @{$cmds->namespaces}, 'Namespace is set');
26stdout_like(
27 sub {
28 $cmds->run('conllu2korapxml','-v');
29 },
30 qr{zca15\.tree_tagger\.conllu}
31);
32stdout_like(
33 sub {
34 $cmds->run('korapxml2conllu','-v');
35 },
36 qr{zca15\.tree_tagger\.zip}
37);
38done_testing;
391;