Test requires networking
[bioperl-live.git] / t / SearchIO / CigarString.t
blob24d9f1315d0a04f67ad51de938473417e43f5c63
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
5 use strict;
7 BEGIN {
8     use lib '.';
9         use Bio::Root::Test;
10         
11         test_begin(-tests => 4);
12     
13         use_ok('Bio::SearchIO');
16 my $searchio = Bio::SearchIO->new(
17          -format => 'blast',
18     -file => test_input_file('blast.report')
21 my @hsps = ();
22 while(my $result = $searchio->next_result){
23     while(my $hit = $result->next_hit){
24         while(my $hsp = $hit->next_hsp){
25             push @hsps, $hsp;
26         }
27     }
30 my $first_hsp = shift @hsps;
31 my $first_hsp_cigar_string = '504M'; 
32 is $first_hsp->cigar_string, $first_hsp_cigar_string;
33 is $first_hsp->cigar_string, $first_hsp_cigar_string; # fetch from hash
35 my $second_hsp = $hsps[0];
36 my $second_hsp_cigar_string = '29M18I22M11I20MD33M4I22M3I25M5I21MI33MD14M';
37 is $second_hsp->cigar_string, $second_hsp_cigar_string;