Supply TEMPLATE and SUFFIX for temporary query sequence files.
[bioperl-run.git] / t / Match.t
bloba26819ac95bc329bad88ebb7e03df07c66c46713
1 # -*-Perl-*-
2 ## Bioperl Test Harness Script for Modules
4 use strict;
6 BEGIN {
7     use Bio::Root::Test;
8     test_begin(-tests => 7,
9                -requires_modules => ['Config::Any']);
10     use_ok('Bio::Tools::Run::Match');
13 # setup input files etc
14 my $seq_file = test_input_file('fasta.fa');
15 my $mxlib = test_input_file('transfac.dat');
17 my $factory = Bio::Tools::Run::Match->new(-quiet => 1,
18                                           -mxlib => $mxlib);
20 isa_ok($factory, 'Bio::Tools::Run::Match');
21 is $factory->mxlib, $mxlib, 'mxlib parameter was set';
23 # test default factory values
24 is ($factory->program_dir, $ENV{'MATCHDIR'}, 'program_dir returned correct default');
25 is ($factory->program_name(), 'match', 'Correct exe default name');
27 # test the program itself
28 SKIP: {
29     test_skip(-tests => 2,
30                           -requires_executable => $factory);
32         use_ok('Bio::SeqIO');
33         my $si = Bio::SeqIO->new(-file => $seq_file, -format => 'fasta');
34         my $seq = $si->next_seq;
36         my @results = $factory->run($seq);
37         is @results, 246;