1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 7);
15 my $verbose = test_debug();
17 my $t_file = test_input_file('test.ace');
21 open my $BEFORE, '<', $t_file or die "Could not read file '$t_file': $!\n";
26 my $a_in = Bio::SeqIO->new( -FILE => $t_file,
30 while (my $a = $a_in->next_seq) {
34 is @a_seq, 3, 'number of sequence objects';
36 my $esc_name = $a_seq[1]->display_id;
37 is $esc_name, 'Name; 4% strewn with \ various / escaped characters',
38 "unescaping of characters, $esc_name";
40 is $a_seq[0]->alphabet, 'protein', 'alphabets detected';
41 is $a_seq[1]->alphabet, 'dna', 'alphabets detected';
43 my $o_file = test_output_file();
44 my $a_out = Bio::SeqIO->new( -FILE => ">$o_file",
49 $a_out->write_seq($a) or $a_out_ok = 0;
51 undef($a_out); # Flush to disk
52 is $a_out_ok,1,'writing sequence';
57 open my $AFTER, '<', $o_file or die "Could not read file '$o_file': $!\n";
62 is( ($before and $after and ($before eq $after)), 1, 'test output');