[bug 2686]
[bioperl-live.git] / t / Signalp.t
blobf87f6b5103b54121fd6553c79a037d7820eed264
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN {
7         use lib 't/lib';
8     use BioperlTest;
9     
10     test_begin(-tests => 11);
11         
12     use_ok('Bio::Tools::Signalp');
15 # global setting
17 my $verbose = test_debug();
19 # shared variables
21 my $infile;
22 my $parser;
23 my @feat;
25 # negative example without "YES" features
27 ok $infile = test_input_file('signalp.negative.out');
28 ok $parser = Bio::Tools::Signalp->new(-file=>$infile, -verbose=>$verbose);
30 while ( my $feat = $parser->next_result ) {
31   push @feat, $feat;
33 is @feat, 0;
34 is $parser->_seqname, 'my_fasta_id';
35 is $parser->_fact1,   'NO';
37 # positive example with "YES" features
39 ok $infile = test_input_file('signalp.positive.out');
40 ok $parser = Bio::Tools::Signalp->new(-file=>$infile, -verbose=>$verbose);
43 #  The current module does NOT parse stuff properly
44 #  It is probably from version 2 but version 3 is used today
45 #  This has to be investigated!!!! --Torsten
46 #  FIXME / TODO? / BUG / *** 
47
49 while ( my $feat = $parser->next_result ) {
50   push @feat, $feat;
52 is @feat , 1;
53 is $parser->_seqname, 'my_fasta_id';
54 is $parser->_fact1,   'YES';