X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F16xml-parser.t;h=eee29df544dc1c5d7f3fd330500e48b8e40c8234;hb=b35303534de4c377a4c9dea7a5efb8dfcf759537;hp=be7372aa4f1d2f3e3e3bb77340bfc7a647a8ce85;hpb=2b2601b506861fa81674c960752231365bdbf436;p=dbsrgits%2FSQL-Translator.git diff --git a/t/16xml-parser.t b/t/16xml-parser.t index be7372a..eee29df 100644 --- a/t/16xml-parser.t +++ b/t/16xml-parser.t @@ -10,7 +10,7 @@ # Tests that; # -use Test::More tests => 78; +use Test::More; use Test::Exception; use strict; @@ -68,6 +68,8 @@ sub test_field { # Testing 1,2,3,4... #============================================================================= +plan tests => 89; + use SQL::Translator; use SQL::Translator::Schema::Constants; @@ -97,9 +99,9 @@ is_deeply( \@tblnames, [qw/Basic/], "tables"); # Basic my $tbl = $scma->get_table("Basic"); is $tbl->order, 1, "Basic->order"; -is_deeply( [map {$_->name} $tbl->get_fields], - [qw/id title description email explicitnulldef explicitemptystring/] , - "Table Basic's fields"); +is_deeply( [map {$_->name} $tbl->get_fields], [qw/ + id title description email explicitnulldef explicitemptystring singletagdef +/] , "Table Basic's fields"); test_field($tbl->get_field("id"),{ name => "id", order => 1, @@ -148,6 +150,13 @@ test_field($tbl->get_field("explicitemptystring"),{ default_value => "", is_nullable => 1, }); +test_field($tbl->get_field("singletagdef"),{ + name => "singletagdef", + order => 7, + data_type => "varchar", + default_value => "", + is_nullable => 1, +}); my @indices = $tbl->get_indices; is scalar(@indices), 1, "Table basic has 1 index";