Added tests for RT#37814 (parsing of double quotes, autoincrement).
[dbsrgits/SQL-Translator.git] / t / 27sqlite-parser.t
index 0540449..c221312 100644 (file)
@@ -10,7 +10,7 @@ use SQL::Translator;
 use SQL::Translator::Schema::Constants;
 
 BEGIN {
-    maybe_plan(9,
+    maybe_plan(12,
         'SQL::Translator::Parser::SQLite');
 }
 SQL::Translator::Parser::SQLite->import('parse');
@@ -32,6 +32,12 @@ my $file = "$Bin/data/sqlite/create.sql";
     my $t1 = shift @tables;
     is( $t1->name, 'person', "'Person' table" );
 
+    my @fields = $t1->get_fields;
+    is( scalar @fields, 6, 'Six fields in "person" table');
+    my $fld1 = shift @fields;
+    is( $fld1->name, 'person_id', 'First field is "person_id"');
+    is( $fld1->is_auto_increment, 1, 'Is an autoincrement field');
+
     my $t2 = shift @tables;
     is( $t2->name, 'pet', "'Pet' table" );