use
vars
qw($error $NUMTESTS $out_file)
;
BEGIN {
$NUMTESTS
= 2;
$error
= 0;
$out_file
= File::Spec->catfile(
qw(t data tmp-chaosxml)
);
if
( $@ ) {
}
eval
{
};
if
( $@ ) {
$error
= 1;
warn
"Data::Stag::XMLWriter not installed, cannot perform chaosxml tests\n"
;
}
plan
tests
=>
$NUMTESTS
;
}
END {
foreach
(
$Test::ntest
..
$NUMTESTS
) {
skip(
'Unable to run all of the chaosxml tests'
,1);
}
}
if
(
$error
== 1 ) {
exit
(0);
}
my
$verbose
=
$ENV
{
'BIOPERLDEBUG'
};
ok(1);
my
$in
= Bio::SeqIO->new(
-format
=>
'genbank'
,
-verbose
=>
$verbose
,
-file
=> Bio::Root::IO->catfile
qw(t data AE003644_Adh-genomic.gb)
);
my
$seq
=
$in
->next_seq;
my
$out
= Bio::SeqIO->new(
-file
=>
">$out_file"
,
-verbose
=>
$verbose
,
-format
=>
'chaosxml'
);
$out
->write_seq(
$seq
);
ok (-e
$out_file
);
END {
unlink
$out_file
if
-e
$out_file
;
}