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);
13 maybe_plan(4, 'Template', 'Test::Differences')
15 use Test::Differences;
19 # Access to test libs. We want Producer/BaseTest.pm from here.
23 # Parse the test XML schema
25 $obj = SQL::Translator->new(
29 from => "XML-SQLFairy",
30 filename => "$Bin/data/xml/schema.xml",
31 to => "Producer::BaseTest::produce",
34 lives_ok { $out = $obj->translate; } "Translate ran";
35 is $obj->error, '' ,"No errors";
36 ok $out ne "" ,"Produced something!";
37 local $/ = undef; # slurp
38 eq_or_diff $out, <DATA> ,"Output looks right";
47 Fields: id title description email explicitnulldef explicitemptystring emptytagdef