1 # -*-Perl-*- Test Harness script for Bioperl
9 test_begin( -tests => 12 );
11 use_ok('Bio::SeqIO::pir');
14 my $verbose = test_debug();
16 my $in = Bio::SeqIO->new(
17 -file => test_input_file('seqfile.pir'),
22 ok( defined $in, 'new instance is defined ' );
23 isa_ok( $in, 'Bio::SeqIO' );
25 my $out = Bio::SeqIO->new(
30 while ( my $seq = $in->next_seq() ) {
31 ok( $seq->length > 1, 'checked length' );
32 $out->write_seq($seq) if $verbose > 0;
35 # Empty description line
36 $in = Bio::SeqIO->new(
37 -file => test_input_file('seqfile-no-desc.pir'),
41 my $seq = $in->next_seq();
42 ok( $seq->seq =~ /^MGD/, 'Correct start' );
43 $seq = $in->next_seq();
44 ok( $seq->seq =~ /^GDV/, 'Correct start' );
45 $seq = $in->next_seq();
46 ok( $seq->seq =~ /^GDV/, 'Correct start' );