1 # -*-Perl-*- Test Harness script for Bioperl
9 test_begin(-tests => 7);
14 my $verbose = test_debug();
16 my $t_file = test_input_file('test.ace');
20 open my $BEFORE, '<', $t_file or die "Could not read file '$t_file': $!\n";
25 my $a_in = Bio::SeqIO->new( -FILE => $t_file,
29 while (my $a = $a_in->next_seq) {
33 is @a_seq, 3, 'number of sequence objects';
35 my $esc_name = $a_seq[1]->display_id;
36 is $esc_name, 'Name; 4% strewn with \ various / escaped characters',
37 "unescaping of characters, $esc_name";
39 is $a_seq[0]->alphabet, 'protein', 'alphabets detected';
40 is $a_seq[1]->alphabet, 'dna', 'alphabets detected';
42 my $o_file = test_output_file();
43 my $a_out = Bio::SeqIO->new( -FILE => ">$o_file",
48 $a_out->write_seq($a) or $a_out_ok = 0;
50 undef($a_out); # Flush to disk
51 is $a_out_ok,1,'writing sequence';
56 open my $AFTER, '<', $o_file or die "Could not read file '$o_file': $!\n";
61 is( ($before and $after and ($before eq $after)), 1, 'test output');