blob: 170eccbb735b1850305e4939cfbb7d9ba5318730 [file] [log] [blame]
Akrone2b902d2016-08-16 16:50:11 +02001#/usr/bin/env perl
2use strict;
3use warnings;
4use File::Basename 'dirname';
5use File::Spec::Functions qw/catdir catfile/;
6use File::Temp qw/ :POSIX /;
7use Mojo::Util qw/slurp/;
8use Mojo::JSON qw/decode_json/;
9use IO::Uncompress::Gunzip;
10use Test::More;
11use Test::Output;
12use Data::Dumper;
13
14my $f = dirname(__FILE__);
15my $script = catfile($f, '..', '..', 'script', 'korapxml2krill');
16ok(-f $script, 'Script found');
17
18stdout_like(
19 sub { system('perl', $script) },
20 qr!Usage.+?korapxml2krill!s,
21 'Usage output'
22);
23
24stdout_like(
25 sub { system('perl', $script, '--help') },
26 qr!Usage.+?korapxml2krill!s,
27 'Usage output'
28);
29
30stdout_like(
31 sub { system('perl', $script, '--version') },
32 qr!Version \d+\.\d+!s,
33 'Version output'
34);
35
36done_testing;
37__END__