Introduce tei2korapxml command
Change-Id: I6b862a46a1b56d27474264793aebed3257f7643f
diff --git a/t/plugin/tei2korapxml.t b/t/plugin/tei2korapxml.t
new file mode 100644
index 0000000..6954281
--- /dev/null
+++ b/t/plugin/tei2korapxml.t
@@ -0,0 +1,33 @@
+use Test::More;
+use Test::Mojo;
+use Test::Output;
+
+eval {
+ require KorAP::XML::TEI;
+ 1;
+} || do {
+ plan skip_all => "KorAP::XML::TEI is not installed";
+};
+
+my $t = Test::Mojo->new(Kalamar => {
+ Kalamar => {
+ plugins => ['Tei2KorAPXML']
+ }
+});
+
+my $app = $t->app;
+
+my $cmds = $app->commands;
+
+ok(grep/::Tei2KorAPXML/, @{$cmds->namespaces}, 'Namespace is set');
+
+stdout_like(
+ sub {
+ $cmds->run('tei2korapxml','-v');
+ },
+ qr{cat corpus\.i5\.xml}
+);
+
+done_testing;
+
+1;