~ubuntu-branches/ubuntu/lucid/bioperl/lucid

« back to all changes in this revision

Viewing changes to t/ePCR.t

  • Committer: Bazaar Package Importer
  • Author(s): Matt Hope
  • Date: 2002-03-20 01:16:30 UTC
  • Revision ID: james.westby@ubuntu.com-20020320011630-wyvmxwc7o5bi4665
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

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
    use vars qw($NUMTESTS $DEBUG);
 
19
    $NUMTESTS = 23;
 
20
    $DEBUG   = 0;
 
21
    plan test => $NUMTESTS;
 
22
}
 
23
 
 
24
use Bio::Tools::EPCR;
 
25
use Bio::SeqIO;
 
26
use Bio::Root::IO;
 
27
 
 
28
my $seqio = new Bio::SeqIO('-format' => 'fasta', '-file' => Bio::Root::IO->catfile("t","data","genomic-seq.fasta"));
 
29
 
 
30
my $seq = $seqio->next_seq;
 
31
ok($seq);
 
32
my $epcr = new Bio::Tools::EPCR( '-file' => Bio::Root::IO->catfile("t","data","genomic-seq.epcr"));
 
33
ok ($epcr);
 
34
while( defined(my $feature = $epcr->next_feature) ) {
 
35
    ok($feature);
 
36
    ok($feature->start);
 
37
    ok($feature->end);
 
38
    $seq->add_SeqFeature($feature);
 
39
}
 
40
 
 
41
 
 
42
if( $DEBUG ) {
 
43
    $seqio = new Bio::SeqIO('-format' => 'genbank' );
 
44
    $seqio->write_seq($seq);
 
45
}