~ubuntu-branches/ubuntu/hoary/bioperl/hoary

« back to all changes in this revision

Viewing changes to t/SeqAnal.t

  • Committer: Bazaar Package Importer
  • Author(s): Matt Hope
  • Date: 2004-04-18 14:24:11 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040418142411-gr92uexquw4w8liq
Tags: 1.4-1
* New upstream release
* Examples and working code are installed by default to usr/bin,
  this has been moved to usr/share/doc/bioperl/bin

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#-*-Perl-*-
2
 
## Bioperl Test Harness Script for Modules
3
 
 
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'
6
 
 
7
 
use strict;
8
 
 
9
 
BEGIN {     
10
 
    # to handle systems with no installed Test module
11
 
    # we include the t dir (where a copy of Test.pm is located)
12
 
    # as a fallback
13
 
    eval { require Test; };
14
 
    if( $@ ) {
15
 
        use lib 't';
16
 
    }
17
 
    use Test;
18
 
    plan test => 1;
19
 
}
20
 
 
21
 
use Bio::Tools::SeqAnal;
22
 
use Bio::Tools::IUPAC;
23
 
use Bio::Seq;
24
 
 
25
 
# test IUPAC
26
 
 
27
 
my $ambiseq = new Bio::Seq (-seq => 'ARTCGTTGR', -type =>
28
 
                            'Dna'); 
29
 
 
30
 
my $stream  = new Bio::Tools::IUPAC('-seq' => $ambiseq);
31
 
 
32
 
my $b = 1; 
33
 
while (my $uniqueseq = $stream->next_seq()) {
34
 
    if( ! $uniqueseq->isa('Bio::Seq') ) {
35
 
        $b =0;
36
 
        last; # no point continuing if we get here
37
 
    }
38
 
}
39
 
ok $b;