~ubuntu-branches/ubuntu/saucy/bioperl/saucy-proposed

« back to all changes in this revision

Viewing changes to t/asciitree.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
 
# $Id: asciitree.t,v 1.1.6.1 2006/10/16 17:08:15 sendu Exp $
3
 
# Before `make install' is performed this script should be runnable with
4
 
# `make test'. After `make install' it should work as `perl test.t'
5
 
 
6
 
use strict;
7
 
use vars qw($NUMTESTS $out_file);
8
 
 
9
 
BEGIN {
10
 
        $NUMTESTS = 2;
11
 
        use File::Spec;
12
 
        $out_file = File::Spec->catfile(qw(t data tmp-asciitree));
13
 
        # to handle systems with no installed Test module
14
 
        # we include the t dir (where a copy of Test.pm is located)
15
 
        # as a fallback
16
 
        eval { require Test; };
17
 
        if ( $@ ) {
18
 
                use lib 't';
19
 
        }
20
 
        use Test;
21
 
        plan tests => $NUMTESTS;
22
 
}
23
 
 
24
 
use Bio::SeqIO::asciitree;
25
 
use Bio::Root::IO;
26
 
 
27
 
my $verbose = $ENV{'BIOPERLDEBUG'};
28
 
 
29
 
ok(1);
30
 
 
31
 
# asciitree is a write-only format
32
 
my $in = Bio::SeqIO->new(-format => 'genbank',
33
 
                                                                 -verbose => $verbose,
34
 
                                                                 -file => Bio::Root::IO->catfile
35
 
                                                                 qw(t data AE003644_Adh-genomic.gb) );
36
 
my $seq = $in->next_seq;
37
 
 
38
 
my $out = Bio::SeqIO->new(-file => ">$out_file",
39
 
                                                                  -verbose => $verbose,
40
 
                                                                  -format => 'asciitree');
41
 
$out->write_seq($seq);
42
 
ok (-e $out_file);
43
 
 
44
 
END {
45
 
        unlink $out_file if -e $out_file;
46
 
}