[Bast-commits] r6880 -
branches/DBIx-Class-Schema-Loader/mssql_tweaks/t
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Tue Jun 30 14:03:30 GMT 2009
Author: caelum
Date: 2009-06-30 14:03:30 +0000 (Tue, 30 Jun 2009)
New Revision: 6880
Added:
branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/16mssql_common.t
Modified:
branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/17mssql_dot_in_table_name.t
Log:
add a test for mssql through dbd::sybase (which fails) and make mssql_dot_in_table_name test work for either sybase or odbc
Added: branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/16mssql_common.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/16mssql_common.t (rev 0)
+++ branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/16mssql_common.t 2009-06-30 14:03:30 UTC (rev 6880)
@@ -0,0 +1,23 @@
+use strict;
+use lib qw(t/lib);
+use dbixcsl_common_tests;
+
+my $dsn = $ENV{DBICTEST_MSSQL_DSN} || '';
+my $user = $ENV{DBICTEST_MSSQL_USER} || '';
+my $password = $ENV{DBICTEST_MSSQL_PASS} || '';
+
+my $tester = dbixcsl_common_tests->new(
+ vendor => 'Microsoft',
+ quote_char => [qw/[ ]/],
+ auto_inc_pk => 'INTEGER IDENTITY NOT NULL PRIMARY KEY',
+ dsn => $dsn,
+ user => $user,
+ password => $password,
+);
+
+if( !$dsn || !$user ) {
+ $tester->skip_tests('You need to set the DBICTEST_MSSQL_DSN, _USER, and _PASS environment variables');
+}
+else {
+ $tester->run_tests();
+}
Modified: branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/17mssql_dot_in_table_name.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/17mssql_dot_in_table_name.t 2009-06-30 13:49:44 UTC (rev 6879)
+++ branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/17mssql_dot_in_table_name.t 2009-06-30 14:03:30 UTC (rev 6880)
@@ -12,12 +12,19 @@
use DBIx::Class::Schema::Loader 'make_schema_at', "dump_to_dir:$DUMP_DIR";
use File::Path;
-my $dsn = $ENV{DBICTEST_MSSQL_ODBC_DSN} || '';
-my $user = $ENV{DBICTEST_MSSQL_ODBC_USER} || '';
-my $password = $ENV{DBICTEST_MSSQL_ODBC_PASS} || '';
+my $dsn = $ENV{DBICTEST_MSSQL_ODBC_DSN} ||
+ $ENV{DBICTEST_MSSQL_DSN} || '';
+my $user = $ENV{DBICTEST_MSSQL_ODBC_USER} ||
+ $ENV{DBICTEST_MSSQL_USER} || '';
+
+my $password = $ENV{DBICTEST_MSSQL_ODBC_PASS} ||
+ $ENV{DBICTEST_MSSQL_PASS} || '';
+
if( !$dsn || !$user ) {
- plan skip_all => 'You need to set the DBICTEST_MSSQL_ODBC_DSN, _USER, and _PASS environment variables';
+ plan skip_all =>
+'You need to set the DBICTEST_MSSQL_ODBC_DSN (or DBICTEST_MSSQL_DSN), _USER,' .
+' and _PASS environment variables';
exit;
}
More information about the Bast-commits
mailing list