X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F18firebird_common.t;h=342d88550361179d0bd0ce26cf221f92123add1b;hb=772b79e2a50a9f211b9e8a148a85e89225aeb68e;hp=9d71c1cd36637771a45d2a1d7ce465fb94ae85a4;hpb=ec957051ac1db23ae1de63e3783833883e47d27c;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/18firebird_common.t b/t/18firebird_common.t index 9d71c1c..342d885 100644 --- a/t/18firebird_common.t +++ b/t/18firebird_common.t @@ -41,7 +41,9 @@ my $tester = dbixcsl_common_tests->new( ); }, null => '', - loader_options => { unquoted_ddl => 1 }, + preserve_case_mode_is_exclusive => 1, + quote_char => '"', + warnings => [ qr/'preserve_case' option/ ], connect_info => [ ($dbd_interbase_dsn ? { dsn => $dbd_interbase_dsn, user => $dbd_interbase_user, @@ -54,8 +56,62 @@ my $tester = dbixcsl_common_tests->new( password => $odbc_password, } : ()), ], + data_types => { + # based on the Interbase Data Definition Guide + # http://www.ibphoenix.com/downloads/60DataDef.zip + # + # Numeric types + 'smallint' => { data_type => 'smallint' }, + 'int' => { data_type => 'integer' }, + 'integer' => { data_type => 'integer' }, + 'bigint' => { data_type => 'bigint' }, + 'float' => { data_type => 'real' }, + 'double precision' => + { data_type => 'double precision' }, + 'real' => { data_type => 'real' }, + + 'float(2)' => { data_type => 'real' }, + 'float(7)' => { data_type => 'real' }, + 'float(8)' => { data_type => 'double precision' }, + + 'decimal' => { data_type => 'decimal' }, + 'dec' => { data_type => 'decimal' }, + 'numeric' => { data_type => 'numeric' }, + + 'decimal(3)' => { data_type => 'decimal', size => [3,0] }, + + 'decimal(3,3)' => { data_type => 'decimal', size => [3,3] }, + 'dec(3,3)' => { data_type => 'decimal', size => [3,3] }, + 'numeric(3,3)' => { data_type => 'numeric', size => [3,3] }, + + 'decimal(6,3)' => { data_type => 'decimal', size => [6,3] }, + 'numeric(6,3)' => { data_type => 'numeric', size => [6,3] }, + + 'decimal(12,3)' => { data_type => 'decimal', size => [12,3] }, + 'numeric(12,3)' => { data_type => 'numeric', size => [12,3] }, + + 'decimal(18,18)' => { data_type => 'decimal', size => [18,18] }, + 'dec(18,18)' => { data_type => 'decimal', size => [18,18] }, + 'numeric(18,18)' => { data_type => 'numeric', size => [18,18] }, + + # Date and Time Types + 'date' => { data_type => 'date' }, + 'timestamp default current_timestamp' + => { data_type => 'timestamp', default_value => \'current_timestamp' }, + 'time' => { data_type => 'time' }, + + # String Types + 'char' => { data_type => 'char', size => 1 }, + 'char(11)' => { data_type => 'char', size => 11 }, + 'varchar(20)' => { data_type => 'varchar', size => 20 }, + + # Blob types + 'blob' => { data_type => 'blob' }, + 'blob sub_type text' + => { data_type => 'blob sub_type text' }, + }, extra => { - count => 7, + count => 6, run => sub { $schema = shift; @@ -87,15 +143,8 @@ q{ my $guard = Scope::Guard->new(\&cleanup_extra); - delete $schema->_loader->{unquoted_ddl}; - - my $warning; - { - local $SIG{__WARN__} = sub { $warning = shift }; - $schema->_loader->_setup; - } - like $warning, qr/unquoted_ddl option/, - 'warning mentions unquoted_ddl option'; + local $schema->_loader->{preserve_case} = 1; + $schema->_loader->_setup; { local $SIG{__WARN__} = sub {};