App-Fasops
view release on metacpan or search on metacpan
t/05-covers.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use App::Cmd::Tester;
use App::Fasops;
my $result = test_app( 'App::Fasops' => [qw(help covers)] );
like( $result->stdout, qr{covers}, 'descriptions' );
$result = test_app( 'App::Fasops' => [qw(covers)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Fasops' => [qw(covers t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result = test_app( 'App::Fasops' => [qw(covers t/example.fas -o stdout)] );
is( ( scalar grep {/\S/} split( /\n/, $result->stdout ) ), 11, 'line count' );
like( $result->stdout, qr{RM11.+S288c.+Spar.+YJM789}s, 'name list' );
$result = test_app( 'App::Fasops' => [qw(covers t/example.fas -n S288c -l 50 -t 10 -o stdout)] );
is( ( scalar grep {/\S/} split( /\n/, $result->stdout ) ), 2, 'line count' );
like( $result->stdout, qr{\-\-\-\s+I:\s+}s, 'one species' );
done_testing();
( run in 1.506 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )