algorithm can be SSEARCH as well; use test_output_file() for tempfile cleanup
[bioperl-run.git] / t / Match.t
blob5994250dca5726c75bc38f4a185bc14252850bbb
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     use_ok('Bio::Tools::Run::Match');
12 # setup input files etc
13 my $seq_file = test_input_file('fasta.fa');
14 my $mxlib = test_input_file('transfac.dat');
16 my $factory = Bio::Tools::Run::Match->new(-quiet => 1,
17                                           -mxlib => $mxlib);
19 isa_ok($factory, 'Bio::Tools::Run::Match');
20 is $factory->mxlib, $mxlib, 'mxlib parameter was set';
22 # test default factory values
23 is ($factory->program_dir, $ENV{'MATCHDIR'}, 'program_dir returned correct default');
24 is ($factory->program_name(), 'match', 'Correct exe default name');
26 # test the program itself
27 SKIP: {
28     test_skip(-tests => 2,
29                           -requires_executable => $factory);
30     
31         use_ok('Bio::SeqIO');
32         my $si = Bio::SeqIO->new(-file => $seq_file, -format => 'fasta');
33         my $seq = $si->next_seq;
34         
35         my @results = $factory->run($seq);
36         is @results, 246;