From: Ken Youens-Clark Date: Mon, 1 Mar 2004 17:41:20 +0000 (+0000) Subject: Updated with comment tests. X-Git-Tag: v0.06~160 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fcc393cdf3f0a7eb2bea65ab258577a2e6e17334;p=dbsrgits%2FSQL-Translator.git Updated with comment tests. --- diff --git a/t/14postgres-parser.t b/t/14postgres-parser.t index d81abe1..8d4586d 100644 --- a/t/14postgres-parser.t +++ b/t/14postgres-parser.t @@ -14,12 +14,14 @@ if ($@) { plan skip_all => "$@"; } else { - plan tests => 117; + plan tests => 119; } my $t = SQL::Translator->new( trace => 0 ); my $sql = q[ + -- comment on t_test1 create table t_test1 ( + -- this is the primary key f_serial serial NOT NULL default '0' primary key, f_varchar character varying (255), f_double double precision, @@ -86,6 +88,8 @@ is( scalar @tables, 2, 'Two tables' ); my $t1 = shift @tables; is( $t1->name, 't_test1', 'Table t_test1 exists' ); +is( $t1->comments, 'comment on t_test1', 'Table comment exists' ); + my @t1_fields = $t1->get_fields; is( scalar @t1_fields, 11, '11 fields in t_test1' ); @@ -96,6 +100,7 @@ is( $f1->is_nullable, 0, 'Field cannot be null' ); is( $f1->size, 11, 'Size is "11"' ); is( $f1->default_value, '0', 'Default value is "0"' ); is( $f1->is_primary_key, 1, 'Field is PK' ); +is( $f1->comments, 'this is the primary key', 'Comment' ); is( $f1->is_auto_increment, 1, 'Field is auto increment' ); my $f2 = shift @t1_fields;