1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
use Test::Files;
BEGIN { unshift( @INC, './lib' ) }
$ENV{PATH} .= ":./bin";
BEGIN {
use Test::Most;
use_ok('Bio::Roary::CombinedProteome');
}
my $obj;
ok(
$obj = Bio::Roary::CombinedProteome->new(
proteome_files => [ 't/data/example_1.faa', 't/data/example_2.faa' ],
output_filename => 'combined_proteome.fa'
),
'initalise object with two files'
);
ok( $obj->create_combined_proteome_file, 'Create a combined file' );
compare_ok('combined_proteome.fa',
't/data/expected_combined_proteome.fa',
'Combined file is as expected'
);
unlink('combined_proteome.fa');
throws_ok{
Bio::Roary::CombinedProteome->new(
proteome_files => [ 't/data/example_1.faa', 't/data/non_existant_file.faa' ],
output_filename => 'combined_proteome.fa')
} qr /Cant open file/, 'non existant files should throw an error';
done_testing();
|