1 ## Bioperl Test Harness Script for Modules
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!
10 ## ok 1 [not ok 1 (if test fails)]
12 ## ok 2 [not ok 2 (if test fails)]
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;}
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');
43 $trunc = $seq->trunc(1,4);
47 if( $trunc->str() ne 'ACTG' ) {
53 $trans = $seq->translate();
55 if( $trans->str() ne 'TVAST' ) {