App-Dazz
view release on metacpan or search on metacpan
t/03-dazzname.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Dazz;
my $result = test_app( 'App::Dazz' => [qw(help dazzname)] );
like( $result->stdout, qr{dazzname}, 'descriptions' );
$result = test_app( 'App::Dazz' => [qw(dazzname)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Dazz' => [qw(dazzname t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result = test_app( 'App::Dazz' => [qw(dazzname t/1_4.anchor.fasta --prefix B-A:D -o stdout)] );
like( $result->error, qr{Can't accept}, 'bad names' );
$result = test_app( 'App::Dazz' => [qw(dazzname t/1_4.anchor.fasta -o B-A:D)] );
like( $result->error, qr{Can't accept}, 'bad names' );
$result = test_app( 'App::Dazz' => [qw(dazzname t/1_4.anchor.fasta -o stdout)] );
is( ( scalar grep {/\S/} split( /\n/, $result->stdout ) ), 8, 'line count' );
t/04-show2ovlp.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Dazz;
my $result = test_app( 'App::Dazz' => [qw(help show2ovlp)] );
like( $result->stdout, qr{show2ovlp}, 'descriptions' );
$result = test_app( 'App::Dazz' => [qw(show2ovlp)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Dazz' => [qw(show2ovlp t/not_exists t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result = test_app( 'App::Dazz' => [qw(show2ovlp t/1_4.renamed.fasta t/1_4.show.txt -o stdout)] );
is( ( scalar grep {/\S/} split( /\n/, $result->stdout ) ), 50, 'line count' );
like( $result->stdout, qr{overlap}s, 'overlaps' );
$result = test_app(
'App::Dazz' => [qw(show2ovlp t/1_4.renamed.fasta t/1_4.show.txt -r t/not_exists -o stdout)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result = test_app( 'App::Dazz' =>
[qw(show2ovlp t/1_4.renamed.fasta t/1_4.show.txt -r t/1_4.replace.tsv -o stdout)] );
is( ( scalar grep {/\S/} split( /\n/, $result->stdout ) ), 50, 'line count' );
like( $result->stdout, qr{pac7556_20928}s, 'original name' );
done_testing();
t/07-overlap.t view on Meta::CPAN
use App::Cmd::Tester::CaptureExternal; # `dazz overlap` calls `dazz show2ovlp` to write outputs
use App::Dazz;
my $result = test_app( 'App::Dazz' => [qw(help overlap)] );
like( $result->stdout, qr{overlap}, 'descriptions' );
$result = test_app( 'App::Dazz' => [qw(overlap)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Dazz' => [qw(overlap t/1_4.pac.fasta t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "dazz and its deps not installed", 7
unless IPC::Cmd::can_run('dazz')
or IPC::Cmd::can_run('faops')
or IPC::Cmd::can_run('fasta2DB')
or IPC::Cmd::can_run('LAshow')
or IPC::Cmd::can_run('ovlpr');
t/08-overlap2.t view on Meta::CPAN
use App::Cmd::Tester::CaptureExternal; # `dazz overlap2` calls `dazz show2ovlp` to write outputs
use App::Dazz;
my $result = test_app( 'App::Dazz' => [qw(help overlap2)] );
like( $result->stdout, qr{overlap2}, 'descriptions' );
$result = test_app( 'App::Dazz' => [qw(overlap2)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Dazz' => [qw(overlap2 t/1_4.anchor.fasta t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "dazz and its deps not installed", 2
unless IPC::Cmd::can_run('dazz')
or IPC::Cmd::can_run('faops')
or IPC::Cmd::can_run('fasta2DB')
or IPC::Cmd::can_run('LAshow')
or IPC::Cmd::can_run('ovlpr');
t/09-orient.t view on Meta::CPAN
use App::Cmd::Tester::CaptureExternal; # `dazz orient` calls `dazz show2ovlp` to write outputs
use App::Dazz;
my $result = test_app( 'App::Dazz' => [qw(help orient)] );
like( $result->stdout, qr{orient}, 'descriptions' );
$result = test_app( 'App::Dazz' => [qw(orient)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Dazz' => [qw(orient t/1_4.pac.fasta t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result = test_app(
'App::Dazz' => [qw(orient t/1_4.anchor.fasta t/1_4.pac.fasta -r t/not_exists -o stdout)] );
like( $result->error, qr{doesn't exist}, 'restrict file not exists' );
SKIP: {
skip "dazz and its deps not installed", 3
unless IPC::Cmd::can_run('dazz')
or IPC::Cmd::can_run('faops')
or IPC::Cmd::can_run('fasta2DB')
or IPC::Cmd::can_run('LAshow')
or IPC::Cmd::can_run('ovlpr');
t/10-cover.t view on Meta::CPAN
use App::Cmd::Tester::CaptureExternal;
use App::Dazz;
my $result = test_app( 'App::Dazz' => [qw(help cover --range 1-4)] );
like( $result->stdout, qr{cover}, 'descriptions' );
$result = test_app( 'App::Dazz' => [qw(cover --range 1-4)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Dazz' => [qw(cover t/not_exists --range 1-4)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "dazz and its deps not installed", 3
unless IPC::Cmd::can_run('dazz')
or IPC::Cmd::can_run('faops')
or IPC::Cmd::can_run('fasta2DB')
or IPC::Cmd::can_run('LAshow')
or IPC::Cmd::can_run('ovlpr');
t/11-group.t view on Meta::CPAN
use App::Cmd::Tester::CaptureExternal;
use App::Dazz;
my $result = test_app( 'App::Dazz' => [qw(help group --range 1-4)] );
like( $result->stdout, qr{group}, 'descriptions' );
$result = test_app( 'App::Dazz' => [qw(group --range 1-4)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Dazz' => [qw(group t/not_exists --range 1-4)] );
like( $result->error, qr{need .+input file}, 'need 2 infiles' );
$result = test_app( 'App::Dazz' => [qw(group t/not_exists t/not_exists --range 1-4)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "dazz and its deps not installed", 2
unless IPC::Cmd::can_run('dazz')
or IPC::Cmd::can_run('faops')
or IPC::Cmd::can_run('fasta2DB')
or IPC::Cmd::can_run('LAshow')
or IPC::Cmd::can_run('ovlpr');
t/14-contained.t view on Meta::CPAN
use App::Cmd::Tester::CaptureExternal;
use App::Dazz;
my $result = test_app( 'App::Dazz' => [qw(help contained)] );
like( $result->stdout, qr{contained}, 'descriptions' );
$result = test_app( 'App::Dazz' => [qw(contained)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Dazz' => [qw(contained t/1_4.pac.fasta t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "dazz and its deps not installed", 7
unless IPC::Cmd::can_run('dazz')
or IPC::Cmd::can_run('faops')
or IPC::Cmd::can_run('fasta2DB')
or IPC::Cmd::can_run('LAshow')
or IPC::Cmd::can_run('ovlpr');
t/15-merge.t view on Meta::CPAN
use App::Cmd::Tester::CaptureExternal;
use App::Dazz;
my $result = test_app( 'App::Dazz' => [qw(help merge)] );
like( $result->stdout, qr{merge}, 'descriptions' );
$result = test_app( 'App::Dazz' => [qw(merge)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Dazz' => [qw(merge t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "dazz and its deps not installed", 3
unless IPC::Cmd::can_run('dazz')
or IPC::Cmd::can_run('faops')
or IPC::Cmd::can_run('fasta2DB')
or IPC::Cmd::can_run('LAshow')
or IPC::Cmd::can_run('ovlpr');
t/16-layout.t view on Meta::CPAN
use App::Cmd::Tester::CaptureExternal;
use App::Dazz;
my $result = test_app( 'App::Dazz' => [qw(help layout)] );
like( $result->stdout, qr{layout}, 'descriptions' );
$result = test_app( 'App::Dazz' => [qw(layout)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Dazz' => [qw(layout t/not_exists)] );
like( $result->error, qr{need .+input file}, 'need 3 infiles' );
$result = test_app( 'App::Dazz' => [qw(layout t/not_exists t/not_exists t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "dazz and its deps not installed", 3
unless IPC::Cmd::can_run('dazz')
or IPC::Cmd::can_run('poa');
my $tempdir = Path::Tiny->tempdir;
$result = test_app(
'App::Dazz' => [
( run in 0.579 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )