9 # Producing a schema with a Translator different from the one the schema was
10 # generated should just work. After all the $schema object is just data.
12 my $base_file = "$Bin/data/xml/schema.xml";
13 my $base_t = SQL::Translator->new;
14 $base_t->$_(1) for qw/add_drop_table no_comments/;
16 # create a base schema attached to $base_t
17 open (my $base_fh, '<', $base_file) or die "$base_file: $!";
19 my $base_schema = $base_t->translate(
21 data => do { local $/; <$base_fh>; },
24 # now create a new translator and try to feed it the same schema
25 my $new_t = SQL::Translator->new;
26 $new_t->$_(1) for qw/add_drop_table no_comments/;
28 my $sql = $new_t->translate(
34 local $TODO = 'This will probably not work before the rewrite';
38 qr/^\s*CREATE TABLE/m, #assume there is at least one create table statement
39 "Received some meaningful output from the producer",