fix Phastcons and Match, has a req for Bio::FeatureIO
[bioperl-run.git] / t / Match.t
blob86b99b53117d90e6aa3972149f74a81be4d6aa92
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_module => 'Bio::FeatureIO',
31                           -requires_executable => $factory);
33         use_ok('Bio::SeqIO');
34         my $si = Bio::SeqIO->new(-file => $seq_file, -format => 'fasta');
35         my $seq = $si->next_seq;
37         my @results = $factory->run($seq);
38         is @results, 246;