t/*: remove "use lib '.'" and t/lib/Error.pm
[bioperl-live.git] / t / SearchIO / Writer / HTMLWriter.t
bloba120f9a93704d86831c7465c4deff1ccfa5f8fa8
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::HTMLResultWriter');
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 $writerhtml = Bio::SearchIO::Writer::HTMLResultWriter->new();
32 my $outhtml = Bio::SearchIO->new(-writer => $writerhtml,
33                 -file   => ">$outfile");
34 $outhtml->write_result($result, 1);
35 ok(-s $outfile);
37 # tests checking HTML file output?