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