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;
20 my $sqlt_version = $SQL::Translator::VERSION;
22 # The _GLOBAL_ table should be removed and its fields copied onto all other
48 # Should include the the items added from the Global table defined above in the
49 # schema as well as those defined in the filter args below.
123 parser_type: SQL::Translator::Parser::YAML
125 producer_type: SQL::Translator::Producer::YAML
128 version: $sqlt_version
132 # Parse the test XML schema
134 $obj = SQL::Translator->new(
141 # Filter from SQL::Translator::Filter::*
143 # A global field to add given in the args
147 data_type => 'timestamp',
159 ) or die "Failed to create translator object: ".SQL::Translator->error;
162 lives_ok { $out = $obj->translate; } "Translate ran";
163 is $obj->error, '' ,"No errors";
164 ok $out ne "" ,"Produced something!";
165 eq_or_diff $out, $ans_yaml ,"Output looks right";