1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 16,
11 -requires_modules => [qw(XML::Parser::PerlSAX XML::Writer)]);
13 use_ok('Bio::SeqIO::tinyseq');
16 my $file = test_input_file('test.tseq');
17 my $outfile = test_output_file();
19 my $instream = Bio::SeqIO->new( -file => $file,
20 -format => 'tinyseq' );
22 my $outstream = Bio::SeqIO->new( -file => ">$outfile",
23 -format => 'tinyseq' );
25 my $seq = $instream->next_seq;
27 ok(defined $seq->seq);
28 is($seq->length, 5830);
29 is($seq->accession_number,'NM_002253');
31 is($seq->species->binomial, 'Homo sapiens');
32 is($seq->species->ncbi_taxid, 9606);
33 $outstream->write_seq($seq);
38 my $reread = Bio::SeqIO->new( -file => $outfile,
39 -format => 'tinyseq' );
41 my $seq2 = $reread->next_seq;
45 is($seq2->length, 5830);
46 is($seq2->accession_number, 'NM_002253');
48 is($seq2->species->binomial, 'Homo sapiens');
49 is($seq2->species->ncbi_taxid, 9606);