Added test for script execution
Change-Id: I9bf622fb9b224e72d6d560cb8a183c7979ebab88
diff --git a/Changes b/Changes
index 7a57280..e4a5f80 100644
--- a/Changes
+++ b/Changes
@@ -1,13 +1,14 @@
-0.18 2016-08-01
+0.18 2016-08-15
- Added REI test.
- - Added multiple archive support to korapxml2krill.
- - Added support for prefix negation in korapxml2krill.
- - Added support for Malt#Dependency.
- - Improved test suite for caching and REI.
- - Added support for MDParser annotation.
- - Added batch processing class for documents.
- - Added test for direct I5 support.
- - Fixed support for Mojolicious 7.
+ - Added multiple archive support to korapxml2krill.
+ - Added support for prefix negation in korapxml2krill.
+ - Added support for Malt#Dependency.
+ - Improved test suite for caching and REI.
+ - Added support for MDParser annotation.
+ - Added batch processing class for documents.
+ - Added test for direct I5 support.
+ - Fixed support for Mojolicious 7.
+ - Added script test.
0.17 2016-03-22
- Rewrite siglen to use slashes as separators.
diff --git a/MANIFEST b/MANIFEST
index f34d130..4529427 100755
--- a/MANIFEST
+++ b/MANIFEST
@@ -48,6 +48,7 @@
lib/KorAP/XML/Annotation/XIP/Sentences.pm
t/archive.t
t/batch_file.t
+t/script.t
t/meta.t
t/meta_caching.t
t/multiple_archives.t
diff --git a/Makefile.PL b/Makefile.PL
index 1ab8172..8e3aae2 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -13,6 +13,7 @@
PREREQ_PM => {
'Mojolicious' => 6.11,
'Packed::Array' => 0.01,
+ 'Test::Output' => 0,
'Log::Log4perl' => 1.42,
'JSON::XS' => 3.01,
'Set::Scalar' => 1.26,
diff --git a/t/script.t b/t/script.t
new file mode 100644
index 0000000..5122b63
--- /dev/null
+++ b/t/script.t
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+use Test::More;
+use File::Basename 'dirname';
+use File::Spec::Functions qw/catfile/;
+use Test::Output;
+use FindBin;
+
+my $script = catfile(dirname(__FILE__), '..', 'script', 'korapxml2krill');
+
+stdout_like(
+ sub { system('perl', $script) },
+ qr!Usage.+?korapxml2krill!s,
+ 'Usage output'
+);
+
+done_testing;
+__END__