X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Fquote_names.t;h=6492f256a0e4e06d81dab8b08ba33d32cd8c2867;hb=f9b5239a;hp=cbf572a00cc7d89ab045adbabec9508219dad7a7;hpb=a0034ff6946ef2782a34d5c1f333eb448833e46f;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/quote_names.t b/t/storage/quote_names.t index cbf572a..6492f25 100644 --- a/t/storage/quote_names.t +++ b/t/storage/quote_names.t @@ -88,6 +88,9 @@ my %dbs = ( MSSQL_ODBC => 'DBIx::Class::Storage::DBI::MSSQL', ); +# lie that we already locked stuff - the tests below do not touch anything +$ENV{DBICTEST_LOCK_HOLDER} = -1; + # Make sure oracle is tried last - some clients (e.g. 10.2) have symbol # clashes with libssl, and will segfault everything coming after them for my $db (sort { @@ -123,6 +126,14 @@ for my $db (sort { is $schema->storage->sql_maker->name_sep, $exp_name_sep, "$db name_sep with quote_names => 1 is $name_sep_text"; + + # if something was produced - it better be quoted + if ( my $ddl = try { $schema->deployment_statements } ) { + + my $quoted_artist = $schema->storage->sql_maker->_quote('artist'); + + like ($ddl, qr/^CREATE\s+TABLE\s+\Q$quoted_artist/msi, "$db DDL contains expected quoted table name"); + } } done_testing;