added bio::ext support
[bioperl-live.git] / t / Seq.t
blob67edd6acd36e3aaa7b74450213bae4767b758059
1 ## Bioperl Test Harness Script for Modules
2 ## $Id$
4 # Before `make install' is performed this script should be runnable with
5 # `make test'. After `make install' it should work as `perl test.t'
7 #-----------------------------------------------------------------------
8 ## perl test harness expects the following output syntax only!
9 ## 1..3
10 ## ok 1  [not ok 1 (if test fails)]
11 ## 2..3
12 ## ok 2  [not ok 2 (if test fails)]
13 ## 3..3
14 ## ok 3  [not ok 3 (if test fails)]
16 ## etc. etc. etc. (continue on for each tested function in the .t file)
17 #-----------------------------------------------------------------------
20 ## We start with some black magic to print on failure.
21 BEGIN { $| = 1; print "1..5\n"; 
22         use vars qw($loaded); }
23 END {print "not ok 1\n" unless $loaded;}
25 use lib '../';
26 use Bio::Seq;
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. 
39 my $seq = Bio::Seq->new(-seq=>'ACTGTGGCGTCAACT',
40                         -desc=>'Sample Bio::Seq object');
41 print "ok 2\n"; 
43 $trunc = $seq->trunc(1,4);
45 print "ok 3\n";
47 if( $trunc->str() ne 'ACTG' ) {
48    print "not ok 4\n";
49 } else {
50    print "ok 4\n";
53 $trans = $seq->translate();
55 if( $trans->str() ne 'TVAST' ) {
56    print "not ok 5\n";
57 } else {
58    print "ok 5\n";