added bio::ext support
[bioperl-live.git] / t / Index.t
blob7da4d4c7dde367e63729f4efceaa108374e29af4
1 ## Bioperl Test Harness Script for Modules
2 ##
3 # CVS Version
4 # $Id$
7 # Before `make install' is performed this script should be runnable with
8 # `make test'. After `make install' it should work as `perl test.t'
10 #-----------------------------------------------------------------------
11 ## perl test harness expects the following output syntax only!
12 ## 1..3
13 ## ok 1  [not ok 1 (if test fails)]
14 ## 2..3
15 ## ok 2  [not ok 2 (if test fails)]
16 ## 3..3
17 ## ok 3  [not ok 3 (if test fails)]
19 ## etc. etc. etc. (continue on for each tested function in the .t file)
20 #-----------------------------------------------------------------------
23 ## We start with some black magic to print on failure.
24 BEGIN { $| = 1; print "1..3\n"; 
25         use vars qw($loaded); }
27 END {print "not ok 1\n" unless $loaded;}
29 use Bio::Index::Fasta;
30 use Bio::Index::SwissPfam;
31 use Bio::Index::EMBL;
33 $loaded = 1;
34 print "ok 1\n";    # 1st test passes.
36 chomp( $dir = `pwd` );
37 $ind = Bio::Index::Fasta->new('Wibbl', 'WRITE');
38 $ind->make_index("$dir/t/seqs.fas");
40 print "ok 2\n";
41 $ind = 0;
43 $ind = Bio::Index::SwissPfam->new('Wibbl2', 'WRITE');
44 $ind->make_index("$dir/t/swisspfam.data");
46 print "ok 3\n";
47 $ind = 0;
49 # don't test EMBL yet. Bad...
51 system("rm -f Wibbl*");