Akron | 63f20d4 | 2017-04-10 23:40:29 +0200 | [diff] [blame] | 1 | use strict; |
| 2 | use warnings; |
| 3 | use Test::More; |
| 4 | use Test::Output; |
| 5 | use File::Basename 'dirname'; |
| 6 | use File::Spec::Functions qw/catdir catfile/; |
| 7 | use File::Temp qw/tempdir/; |
| 8 | |
| 9 | my $f = dirname(__FILE__); |
| 10 | my $script = catfile($f, '..', '..', 'script', 'korapxml2krill'); |
| 11 | |
| 12 | my $input_base = catdir($f, '..', 'corpus', 'archives'); |
| 13 | |
| 14 | # Temporary output |
| 15 | my $output = File::Temp->newdir(CLEANUP => 0); |
| 16 | |
| 17 | my $call = join( |
| 18 | ' ', |
| 19 | 'perl', $script, |
| 20 | 'serial', |
| 21 | '-i' => '"ngafy*.zip"', |
| 22 | '-i' => '"tree*.zip"', |
| 23 | '-ib' => $input_base, |
| 24 | '-o' => $output, |
| 25 | '-l' => 'WARN' |
| 26 | ); |
| 27 | |
| 28 | # Test without parameters |
| 29 | combined_like( |
| 30 | sub { |
| 31 | system($call); |
| 32 | }, |
| 33 | qr!Start serial processing of ngafy\*\.zip!s, |
| 34 | $call |
| 35 | ); |
| 36 | |
| 37 | |
| 38 | done_testing; |
| 39 | __END__ |