0
|
1 #!/usr/bin/env perl
|
|
2 use Moose;
|
|
3 use Data::Dumper;
|
|
4 use Cwd;
|
|
5 use File::Which;
|
|
6
|
|
7 BEGIN { unshift( @INC, './lib' ) }
|
|
8 BEGIN { unshift( @INC, './t/lib' ) }
|
|
9 with 'TestHelper';
|
|
10
|
|
11 BEGIN {
|
|
12 use Test::Most;
|
|
13 use_ok('Bio::Roary::CommandLine::GeneAlignmentFromNucleotides');
|
|
14 }
|
|
15
|
|
16 my $script_name = 'Bio::Roary::CommandLine::GeneAlignmentFromNucleotides';
|
|
17 my $cwd = getcwd();
|
|
18 system('touch empty_file');
|
|
19 system('cp t/data/nuc_to_be_aligned.fa t/data/f.fa');
|
|
20 my %scripts_and_expected_files = (
|
|
21 't/data/f.fa' => [ 't/data/f.fa.aln', 't/data/expected_nuc_multifasta.fa.aln' ],
|
|
22 '-h' => [ 'empty_file', 't/data/empty_file' ],
|
|
23 );
|
|
24
|
|
25 SKIP:
|
|
26 {
|
|
27 skip "prank not installed", 2 unless ( which('prank') );
|
|
28 mock_execute_script_and_check_output( $script_name, \%scripts_and_expected_files );
|
|
29 }
|
|
30
|
|
31 SKIP:
|
|
32 {
|
|
33 skip "mafft not installed", 2 unless ( which('mafft') );
|
|
34 system('cp t/data/nuc_to_be_aligned.fa t/data/f.fa');
|
|
35 %scripts_and_expected_files = (
|
|
36 '--mafft t/data/f.fa' => [ 't/data/f.fa.aln', 't/data/expected_nuc_multifasta_mafft.fa.aln' ],
|
|
37 );
|
|
38 mock_execute_script_and_check_output( $script_name, \%scripts_and_expected_files );
|
|
39 }
|
|
40
|
|
41 done_testing();
|