From: Moritz Lenz Date: Mon, 8 Feb 2010 13:43:50 +0000 (+0000) Subject: use quoting in firebird tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=930689e6e16fae42eb311e051820891d93c3ed92;p=dbsrgits%2FDBIx-Class-Historic.git use quoting in firebird tests --- diff --git a/t/750firebird.t b/t/750firebird.t index 8eb4557..b6a845d 100644 --- a/t/750firebird.t +++ b/t/750firebird.t @@ -30,31 +30,33 @@ foreach my $conn_idx (0..1) { next unless $dsn; $schema = DBICTest::Schema->connect($dsn, $user, $pass, { - auto_savepoint => 1 + auto_savepoint => 1, + quote_char => q["], + name_sep => q[.], }); my $dbh = $schema->storage->dbh; my $sg = Scope::Guard->new(\&cleanup); - eval { $dbh->do("DROP TABLE artist") }; + eval { $dbh->do(q[DROP TABLE "artist"]) }; $dbh->do(<do("DROP GENERATOR gen_artist_artistid") }; - $dbh->do('CREATE GENERATOR gen_artist_artistid'); - eval { $dbh->do("DROP TRIGGER artist_bi") }; + eval { $dbh->do(q[DROP GENERATOR "gen_artist_artistid"]) }; + $dbh->do('CREATE GENERATOR "gen_artist_artistid"'); + eval { $dbh->do('DROP TRIGGER "artist_bi"') }; $dbh->do(<do('DROP TABLE bindtype_test2') }; + eval { $dbh->do('DROP TABLE "bindtype_test2"') }; $dbh->do(q[ - CREATE TABLE bindtype_test2 + CREATE TABLE "bindtype_test2" ( - id INT PRIMARY KEY, - bytea INT, - a_blob BLOB, - a_clob BLOB SUB_TYPE TEXT + "id" INT PRIMARY KEY, + "bytea" INT, + "a_blob" BLOB, + "a_clob" BLOB SUB_TYPE TEXT ) ]); @@ -203,14 +205,14 @@ sub cleanup { }; return unless $dbh; - eval { $dbh->do('DROP TRIGGER artist_bi') }; + eval { $dbh->do('DROP TRIGGER "artist_bi"') }; diag $@ if $@; - eval { $dbh->do('DROP GENERATOR gen_artist_artistid') }; + eval { $dbh->do('DROP GENERATOR "gen_artist_artistid"') }; diag $@ if $@; - foreach my $table (qw/artist bindtype_test/) { - eval { $dbh->do("DROP TABLE $table") }; + foreach my $table (qw/"artist" "bindtype_test"/) { + eval { $dbh->do(q[DROP TABLE "$table"]) }; #diag $@ if $@; } }