fix some edge cases for use_moose option, and more tests
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / 17sybase_asa_common.t
index db6eed3..ef81520 100644 (file)
@@ -30,25 +30,25 @@ my $tester = dbixcsl_common_tests->new(
             password    => $odbc_password,
         } : ()),
     ],
+    loader_options => { preserve_case => 1 },
     data_types  => {
         # http://infocenter.sybase.com/help/topic/com.sybase.help.sqlanywhere.11.0.1/dbreference_en11/rf-datatypes.html
         #
         # Numeric types
-        # XXX rewrite low-precision floats to 'real'
         'bit'         => { data_type => 'bit' },
         'tinyint'     => { data_type => 'tinyint' },
         'smallint'    => { data_type => 'smallint' },
         'int'         => { data_type => 'integer' },
         'integer'     => { data_type => 'integer' },
         'bigint'      => { data_type => 'bigint' },
-        'float'       => { data_type => 'float' },
-        'real'        => { data_type => 'float' },
+        'float'       => { data_type => 'real' },
+        'real'        => { data_type => 'real' },
         'double'      => { data_type => 'double precision' },
         'double precision' =>
                          { data_type => 'double precision' },
 
-        'float(2)'    => { data_type => 'float' },
-        'float(24)'   => { data_type => 'float' },
+        'float(2)'    => { data_type => 'real' },
+        'float(24)'   => { data_type => 'real' },
         'float(25)'   => { data_type => 'double precision' },
         'float(53)'   => { data_type => 'double precision' },
 
@@ -94,7 +94,8 @@ my $tester = dbixcsl_common_tests->new(
         'timestamp'   => { data_type => 'timestamp' },
         # rewrite 'current timestamp' as 'current_timestamp'
         'timestamp default current timestamp'
-                      => { data_type => 'timestamp', default_value => \'current_timestamp' },
+                      => { data_type => 'timestamp', default_value => \'current_timestamp',
+                           original => { default_value => \'current timestamp' } },
         'time'        => { data_type => 'time' },
 
         # String Types
@@ -138,3 +139,4 @@ if (not ($dbd_sqlanywhere_dsn || $odbc_dsn)) {
 else {
     $tester->run_tests();
 }
+# vim:et sts=4 sw=4 tw=0: