requires not required
[bioperl-run.git] / t / DrawGram.t
blob7467d843238a095b308c416910b1850ea7f85c38
1 # -*-Perl-*-
2 ## Bioperl Test Harness Script for Modules
3 ## $Id$
5 use strict;
6 use vars qw($DEBUG);
8 $DEBUG = $ENV{'BIOPERLDEBUG'} || 0;
9 BEGIN {
10     use lib '.';
11     use Bio::Root::Test;
12     test_begin(-tests => 6);
13         use_ok('Bio::Tools::Run::Phylo::Phylip::DrawGram');
14         use_ok('Bio::TreeIO');  
17 SKIP: {
18         my @params = ('-verbose' => test_debug(),
19                           'quiet'    => 1);
20         my $treedraw = Bio::Tools::Run::Phylo::Phylip::DrawGram->new(@params);
21         test_skip(-requires_executable => $treedraw,
22               -tests => 4);
24         $treedraw->fontfile(test_input_file('fontfile'));
25         
26         my $file = $treedraw->draw_tree(test_input_file('treefile.example'));
27         ok($file);
28         ok(-e $file);
29         
30         if( $DEBUG ) {
31                 `gs $file`;
32         }
33         unlink($file);
35         my $intree = Bio::TreeIO->new(-file => test_input_file('treefile.example'));
36         
37         $treedraw->HORIZMARGINS(['2.00','2.5']);
38         $treedraw->ANCESTRALNODES('C');
39         $treedraw->TREESTYLE('PHEN');
40         $treedraw->USEBRANCHLENS('N');
41         
42         $file = $treedraw->draw_tree(test_input_file('treefile.example'));
43         
44         ok($file);
45         ok(-e $file);
46         
47         if( $DEBUG ) {
48                 `gs $file`;
49         }
50         unlink($file);