~ubuntu-branches/ubuntu/trusty/bioperl/trusty-proposed

« back to all changes in this revision

Viewing changes to t/IUPAC.t

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2009-03-10 07:19:11 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090310071911-fukqzw54pyb1f0bd
Tags: 1.6.0-2
* Removed patch system (not used):
  - removed instuctions in debian/rules;
  - removed quilt from Build-Depends in debian/control.
* Re-enabled tests:
  - uncommented test command in debian/rules;
  - uncommented previously missing build-dependencies in debian/control.
  - Re-enabled tests and uncommented build-dependencies accordingly.
* Removed libmodule-build-perl and libtest-harness-perl from
  Build-Depends-Indep (provided by perl-modules).
* Better cleaning of empty directories using find -type d -empty -delete
  instead of rmdir in debian/rules (LP: #324001).

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 => 2;
19
 
}
20
 
 
21
 
#use Bio::Tools::SeqAnal; # deprecated, don't use any more
22
 
use Bio::Tools::IUPAC;
23
 
use Bio::Seq;
24
 
 
25
 
# test IUPAC
26
 
 
27
 
my $ambiseq = new Bio::Seq (-seq => 'ARTCGTTGR',
28
 
                            -alphabet => 'dna'); 
29
 
 
30
 
my $stream  = new Bio::Tools::IUPAC('-seq' => $ambiseq);
31
 
ok $stream->count(), 4;
32
 
 
33
 
my $b = 1; 
34
 
while (my $uniqueseq = $stream->next_seq()) {
35
 
    if( ! $uniqueseq->isa('Bio::Seq') ) {
36
 
        $b = 0;
37
 
        last; # no point continuing if we get here
38
 
    }
39
 
}
40
 
ok $b;
41