blob: be09872fe7df37583572c0714582a4ad3929f026 [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 /;
Akron5fd2d8e2017-06-19 15:29:39 +02007use Mojo::File;
Akrone2b902d2016-08-16 16:50:11 +02008use 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__