From: Rafael Kitover Date: Tue, 30 Jun 2009 14:03:30 +0000 (+0000) Subject: add a test for mssql through dbd::sybase (which fails) and make mssql_dot_in_table_na... X-Git-Tag: 0.04999_08~2^2~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=046e344cc057bdacd8718acf1b6a25e77dfbc2a2;p=dbsrgits%2FDBIx-Class-Schema-Loader.git add a test for mssql through dbd::sybase (which fails) and make mssql_dot_in_table_name test work for either sybase or odbc --- diff --git a/t/16mssql_common.t b/t/16mssql_common.t new file mode 100644 index 0000000..f64b0b4 --- /dev/null +++ b/t/16mssql_common.t @@ -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(); +} diff --git a/t/17mssql_dot_in_table_name.t b/t/17mssql_dot_in_table_name.t index 6efd52b..ab9f435 100644 --- a/t/17mssql_dot_in_table_name.t +++ b/t/17mssql_dot_in_table_name.t @@ -12,12 +12,19 @@ use lib $DUMP_DIR; 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; }