Overhaul of test warning handling - mask off as little as possible
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / 18firebird_common.t
index d73f4e9..486bea2 100644 (file)
@@ -41,7 +41,9 @@ my $tester = dbixcsl_common_tests->new(
         );
     },
     null        => '',
-    loader_options => { preserve_case => 0 },
+    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,
@@ -63,13 +65,13 @@ my $tester = dbixcsl_common_tests->new(
         'int'         => { data_type => 'integer' },
         'integer'     => { data_type => 'integer' },
         'bigint'      => { data_type => 'bigint' },
-        'float'       => { data_type => 'float' },
+        'float'       => { data_type => 'real' },
         'double precision' =>
                          { data_type => 'double precision' },
-        'real'        => { data_type => 'float' },
+        'real'        => { data_type => 'real' },
 
-        'float(2)'    => { data_type => 'float' },
-        'float(7)'    => { data_type => 'float' },
+        'float(2)'    => { data_type => 'real' },
+        'float(7)'    => { data_type => 'real' },
         'float(8)'    => { data_type => 'double precision' },
 
         'decimal'     => { data_type => 'decimal' },
@@ -109,7 +111,7 @@ my $tester = dbixcsl_common_tests->new(
                       => { data_type => 'blob sub_type text' },
     },
     extra => {
-        count  => 7,
+        count  => 6,
         run    => sub {
             $schema = shift;
 
@@ -141,17 +143,11 @@ q{
 
             my $guard = Scope::Guard->new(\&cleanup_extra);
 
-            delete $schema->_loader->{preserve_case};
-
-            my $warning;
-            {
-                local $SIG{__WARN__} = sub { $warning = shift };
-                $schema->_loader->_setup;
-            }
-            like $warning, qr/'preserve_case' option/,
-                'warning mentions preserve_case option';
+            local $schema->_loader->{preserve_case} = 1;
+            $schema->_loader->_setup;
 
             {
+                # FIXME - need to remove blind trap (can not test firebird yet)
                 local $SIG{__WARN__} = sub {};
                 $schema->rescan;
             }
@@ -179,6 +175,7 @@ if (not ($dbd_interbase_dsn || $odbc_dsn)) {
 else {
     # get rid of stupid warning from InterBase/GetInfo.pm
     if ($dbd_interbase_dsn) {
+        # FIXME - need to remove blind trap (can not test firebird yet)
         local $SIG{__WARN__} = sub {};
         require DBD::InterBase;
         require DBD::InterBase::GetInfo;