4 # Before `make install' is performed this script should be runnable with
5 # `make test'. After `make install' it should work as `perl test.pl'
10 use Test::SQL::Translator qw(maybe_plan);
15 maybe_plan(4, 'YAML', 'Test::Differences')
17 use Test::Differences;
60 parser_type: SQL::Translator::Parser::YAML
62 producer_type: SQL::Translator::Producer::YAML
68 # Parse the test schema
70 $obj = SQL::Translator->new(
77 # Filter from SQL::Translator::Filter::*
84 ) or die "Failed to create translator object: ".SQL::Translator->error;
87 lives_ok { $out = $obj->translate; } "Translate ran";
88 is $obj->error, '' ,"No errors";
89 ok $out ne "" ,"Produced something!";
90 # Somewhat hackishly modify the yaml with a regex to avoid
91 # failing randomly on every change of version.
92 $out =~ s/version: .*/version: SUPPRESSED/;
93 eq_or_diff $out, $ans_yaml ,"Output looks right";