X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F15oracle-parser.t;h=786ecd92030b7b6d16669563b17c9b1ddba948a1;hb=2d691ec135298f8a4523656dc0516dcb7af3e8cd;hp=635313ea38bf673ab3e035f5ebfa70526d1d5f04;hpb=b03b49513e239e96d97ec09e3712c4035e520002;p=dbsrgits%2FSQL-Translator.git diff --git a/t/15oracle-parser.t b/t/15oracle-parser.t index 635313e..786ecd9 100644 --- a/t/15oracle-parser.t +++ b/t/15oracle-parser.t @@ -1,10 +1,14 @@ #!/usr/bin/perl +# vim: set ft=perl: use strict; -use Test::More tests => 73; +use Test::More; use SQL::Translator; use SQL::Translator::Schema::Constants; -use SQL::Translator::Parser::Oracle qw(parse); +use Test::SQL::Translator qw(maybe_plan); + +maybe_plan(76, 'SQL::Translator::Parser::Oracle'); +SQL::Translator::Parser::Oracle->import('parse'); my $t = SQL::Translator->new( trace => 0 ); my $sql = q[ @@ -32,11 +36,13 @@ my $sql = q[ FOREIGN KEY ( qtl_trait_category_id ) REFERENCES qtl_trait_category ); + /* qtl table comment */ CREATE TABLE qtl ( + /* qtl_id comment */ qtl_id NUMBER(11) NOT NULL CONSTRAINT pk_qtl PRIMARY KEY, - qtl_accession_id VARCHAR2(20) NOT NULL, + qtl_accession_id VARCHAR2(20) NOT NULL /* accession comment */, published_symbol VARCHAR2(100), qtl_trait_id NUMBER(11) NOT NULL, linkage_group VARCHAR2(32) NOT NULL, @@ -200,6 +206,15 @@ is( scalar @t3_fields, 8, '8 fields in table' ); my @t3_constraints = $t3->get_constraints; is( scalar @t3_constraints, 3, '3 constraints on table' ); +is( $t3->comments, 'qtl table comment', 'Comment "qtl table comment" exists' ); + +my $t3_f1 = shift @t3_fields; +is( $t3_f1->comments, 'qtl_id comment', 'Comment "qtl_id comment" exists' ); + +my $t3_f2 = shift @t3_fields; +is( $t3_f2->comments, 'accession comment', + 'Comment "accession comment" exists' ); + # # qtl_trait_synonym #