5 use Test::More 'no_plan'; #tests => 180;
9 use SQL::Translator::Parser::SQLite 'parse';
10 use SQL::Translator::Schema::Constants;
12 my $file = "$Bin/data/sqlite/create.sql";
16 open my $fh, "<$file" or die "Can't read file '$file': $!\n";
18 my $t = SQL::Translator->new;
21 my $schema = $t->schema;
23 my @tables = $schema->get_tables;
24 is( scalar @tables, 2, 'Parsed two tables' );
26 my $t1 = shift @tables;
27 is( $t1->name, 'person', "'Person' table" );
29 my $t2 = shift @tables;
30 is( $t2->name, 'pet', "'Pet' table" );
32 my @views = $schema->get_views;
33 is( scalar @views, 1, 'Parsed one views' );
35 my @triggers = $schema->get_triggers;
36 is( scalar @triggers, 1, 'Parsed one triggers' );