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);
14 BEGIN { map { $opt{$_}=1 if s/^-// } @ARGV; }
15 use constant DEBUG => (exists $opt{d} ? 1 : 0);
20 #=============================================================================
25 'SQL::Translator::Parser::XML::SQLFairy'
30 use Test::Differences;
33 use SQL::Translator::Producer::TTSchema;
35 # Parse the test XML schema
37 $obj = SQL::Translator->new(
38 debug => DEBUG, #$opt{d},
41 from => "XML-SQLFairy",
42 filename => "$Bin/data/xml/schema.xml",
45 ttfile => "$Bin/data/template/basic.tt",
49 lives_ok { $out = $obj->translate; } "Translate ran";
50 ok $out ne "" ,"Produced something!";
51 local $/ = undef; # slurp
52 eq_or_diff $out, <DATA> ,"Output looks right";
55 #print "Debug:", Dumper($obj) if DEBUG;
62 ==========================================================================
74 foreign_key_reference:
88 foreign_key_reference:
102 foreign_key_reference:
116 foreign_key_reference:
130 foreign_key_reference:
144 foreign_key_reference:
158 foreign_key_reference: