Test requires networking
[bioperl-live.git] / t / SearchIO / SearchIO.t
blobfff438f207c721f1cd1d542ccb479404dbe02416
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN {
7         use lib '.';
8     use Bio::Root::Test;
9     
10     test_begin(-tests => 19);
11         
12         use_ok('Bio::SearchIO');
15 # only methods defined in Bio::SearchIO should be tested here; all
16 # parsers should have their own separate SearchIO_*.t test file
18 # Let's test if _guess_format is doing its job correctly
19 my %pair = ( 'filename.blast'  => 'blast',
20              'filename.bls'    => 'blast',
21              'f.blx'           => 'blast',
22              'f.tblx'          => 'blast',
23              'fast.bls'        => 'blast',
24              'f.fasta'         => 'fasta',
25              'f.fa'            => 'fasta',
26              'f.fx'            => 'fasta',
27              'f.fy'            => 'fasta',
28              'f.ssearch'       => 'fasta',
29              'f.SSEARCH.m9'    => 'fasta',
30              'f.m9'            => 'fasta',
31              'f.psearch'       => 'fasta',
32              'f.osearch'       => 'fasta',
33              'f.exon'          => 'exonerate',
34              'f.exonerate'     => 'exonerate',
35              'f.blastxml'      => 'blastxml',
36              'f.xml'           => 'blastxml');
37 while( my ($file,$expformat) = each %pair ) {
38     is(Bio::SearchIO->_guess_format($file),$expformat, "$expformat for $file");