7 # It's very hard to read and modify YAML by hand. Thus we
8 # use an XML file for definitions, and generate a YAML from
9 # it in Makefile.PL, so we do not saddle the user with XML
10 # dependencies for testing. This test makes sure they do
15 my $base_xml_fn = "$Bin/data/roundtrip.xml";
16 my $autogen_yaml_fn = "$Bin/data/roundtrip_autogen.yaml";
18 my $orig_xml = _parse_to_xml ($base_xml_fn, 'XML');
19 my $new_xml = _parse_to_xml ($autogen_yaml_fn, 'YAML');
21 eq_or_diff ("$new_xml", "$orig_xml", 'YAML test schema matches original XML schema');
26 my $tr = SQL::Translator->new;
27 $tr->no_comments (1); # this will drop the XML header
29 open (my $fh, '<', $fn) or die "$fn: $!";
31 my $xml = $tr->translate (
33 data => do { local $/; <$fh> },