X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Fquote_names.t;h=6492f256a0e4e06d81dab8b08ba33d32cd8c2867;hb=961d79dbe25ef8a92e867fcc84914b4bf568c11d;hp=6bb8bfdc7957efdb85fa19058239488914fa068d;hpb=8a6f41507a1ed8b86711ff9f90f5a81d3461c92a;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/quote_names.t b/t/storage/quote_names.t index 6bb8bfd..6492f25 100644 --- a/t/storage/quote_names.t +++ b/t/storage/quote_names.t @@ -1,7 +1,6 @@ use strict; use warnings; use Test::More; -use Test::Exception; use Data::Dumper::Concise; use Try::Tiny; use lib qw(t/lib); @@ -89,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 { @@ -124,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;