added in test suite for seqio, fixed things to work ;)
[bioperl-live.git] / t / SeqIO.t
blob8769dffb052c33c65b5f727dd205632fab7db62e
1 ## Bioperl Test Harness Script for Modules
3 # Before `make install' is performed this script should be runnable with
4 # `make test'. After `make install' it should work as `perl test.t'
6 #-----------------------------------------------------------------------
7 ## perl test harness expects the following output syntax only!
8 ## 1..3
9 ## ok 1  [not ok 1 (if test fails)]
10 ## 2..3
11 ## ok 2  [not ok 2 (if test fails)]
12 ## 3..3
13 ## ok 3  [not ok 3 (if test fails)]
15 ## etc. etc. etc. (continue on for each tested function in the .t file)
16 #-----------------------------------------------------------------------
19 ## We start with some black magic to print on failure.
20 BEGIN { $| = 1; print "1..3\n"; 
21         use vars qw($loaded); }
22 END {print "not ok 1\n" unless $loaded;}
24 use Bio::SeqIO;
25 use Bio::SeqIO::Fasta;
26 use Bio::SeqIO::EMBL;
28 $loaded = 1;
29 print "ok 1\n";    # 1st test passes.
32 ## End of black magic.
34 ## Insert additional test code below but remember to change
35 ## the print "1..x\n" in the BEGIN block to reflect the
36 ## total number of tests that will be run. 
38 $str = Bio::SeqIO->new(-file => 'temp.fa', -format => 'Fasta');
40 if( $str ) {
41     print "ok 2\n";
42 } else {
43     print "not ok 2\n"; 
46 $seq = $str->next_seq();
48 if( $seq->id eq 'roa1_drome' ) {
49     print "ok 3\n";
50 } else {
51     print "not ok 3\n";