From: Dagfinn Ilmari Mannsåker Date: Wed, 27 May 2015 07:39:58 +0000 (+0200) Subject: Fix t/storage/quote_names.t failures, caused by lazily built sqlmaker X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=07d0bbab9f05e82bfe202d37670de893b2ff4f4b;p=dbsrgits%2FDBIx-Class.git Fix t/storage/quote_names.t failures, caused by lazily built sqlmaker While the entire test is written badly (it ought to use the OptDeps system) it would be too much churn to fix it properly for little benefit. Additionally there is a very good chance that the shortener will become a core dep in the near future, hence the entire point will soon be moot anyway --ribasushi --- diff --git a/Changes b/Changes index 8fe9a0a..5bd566c 100644 --- a/Changes +++ b/Changes @@ -11,6 +11,8 @@ Revision history for DBIx::Class - Fix corner case of stringify-only overloaded objects being used in create()/populate() - Fix t/52leaks.t failures on compilerless systems (RT#104429) + - Fix t/storage/quote_names.t failures on systems with specified Oracle + test credentials while missing the optional Math::Base36 * Misc - Skip tests in a way more intelligent and speedy manner when optional diff --git a/t/storage/quote_names.t b/t/storage/quote_names.t index 6492f25..a4bcefa 100644 --- a/t/storage/quote_names.t +++ b/t/storage/quote_names.t @@ -104,12 +104,12 @@ for my $db (sort { my $schema; - try { + my $sql_maker = try { $schema = DBICTest::Schema->connect($dsn, $user, $pass, { quote_names => 1 }); $schema->storage->ensure_connected; - 1; + $schema->storage->sql_maker; } || next; my ($exp_quote_char, $exp_name_sep) = @@ -118,19 +118,19 @@ for my $db (sort { my ($quote_char_text, $name_sep_text) = map { dumper($_) } ($exp_quote_char, $exp_name_sep); - is_deeply $schema->storage->sql_maker->quote_char, + is_deeply $sql_maker->quote_char, $exp_quote_char, "$db quote_char with quote_names => 1 is $quote_char_text"; - is $schema->storage->sql_maker->name_sep, + is $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'); + my $quoted_artist = $sql_maker->_quote('artist'); like ($ddl, qr/^CREATE\s+TABLE\s+\Q$quoted_artist/msi, "$db DDL contains expected quoted table name"); }