maint: remove Travis stuff which has been replaced with Github actions (#325)
[bioperl-live.git] / t / SearchIO / Writer / TextWriter.t
blob03c84f9095c068ff6da85f0b9ff4453e5e89e4f2
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id: SearchIO_HTMLWriter.t 14995 2008-11-16 06:20:00Z cjfields $
4 use strict;
6 BEGIN {
7     use Bio::Root::Test;
8     
9     test_begin(-tests => 8);
10     
11     use_ok('Bio::SearchIO');
12     use_ok('Bio::SearchIO::Writer::TextResultWriter');
15 my ($searchio, $result,$iter,$hit,$hsp);
17 $searchio = Bio::SearchIO->new('-format' => 'blast',
18                    '-file'   => test_input_file('HUMBETGLOA.tblastx'));
20 $result = $searchio->next_result;
22 isa_ok($result,'Bio::Search::Result::ResultI');
23 $hit = $result->next_hit;
24 is($hit->accession, 'AE000479');
25 is($hit->bits, 33.6);
26 $hsp = $hit->next_hsp;
27 is($hit->hsp->bits,$hsp->bits);
28 isa_ok($hsp->get_aln,'Bio::Align::AlignI');
30 my $outfile = test_output_file();
31 my $writertxt = Bio::SearchIO::Writer::TextResultWriter->new();
32 my $outtxt = Bio::SearchIO->new(-writer => $writertxt,
33                                  -file   => ">$outfile");
34 $outtxt->write_result($result, 1);
35 ok(-s $outfile);
36 # tests checking Text file output?