From: Ken Youens-Clark <kclark@cpan.org>
Date: Tue, 26 Aug 2003 21:50:17 +0000 (+0000)
Subject: Added test for table comment as SQL comment.
X-Git-Tag: v0.04~209
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b03b49513e239e96d97ec09e3712c4035e520002;p=dbsrgits%2FSQL-Translator.git

Added test for table comment as SQL comment.
---

diff --git a/t/15oracle-parser.t b/t/15oracle-parser.t
index 1154f86..635313e 100644
--- a/t/15oracle-parser.t
+++ b/t/15oracle-parser.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 
 use strict;
-use Test::More tests => 72;
+use Test::More tests => 73;
 use SQL::Translator;
 use SQL::Translator::Schema::Constants;
 use SQL::Translator::Parser::Oracle qw(parse);
@@ -19,6 +19,7 @@ my $sql = q[
     comment on column qtl_trait_category.qtl_trait_category_id 
         is 'the primary key!';
 
+    -- foo bar comment
     CREATE TABLE qtl_trait
     (
         qtl_trait_id            NUMBER(11)      NOT NULL    
@@ -117,6 +118,7 @@ is( join(',', $c2->fields), 'trait_category',
 #
 my $t2 = shift @tables;
 is( $t2->name, 'qtl_trait', 'Table "qtl_trait" exists' );
+is( $t2->comments, 'foo bar comment', 'Comment "foo bar" exists' );
 
 my @t2_fields = $t2->get_fields;
 is( scalar @t2_fields, 4, '4 fields in table' );