From: Rafael Kitover Date: Sat, 28 May 2011 01:46:05 +0000 (-0400) Subject: fix warning, fix test counts X-Git-Tag: 0.07011~99 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bec8d1bb7d299556a19011f278982dec9e108fc1;p=dbsrgits%2FDBIx-Class-Schema-Loader.git fix warning, fix test counts --- diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index 7a791fa..324f7e5 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -1848,7 +1848,7 @@ sub _make_column_accessor_name { sub _quote { my ($self, $identifier) = @_; - my $qt = $self->schema->storage->sql_maker->quote_char; + my $qt = $self->schema->storage->sql_maker->quote_char || ''; if (ref $qt) { return $qt->[0] . $identifier . $qt->[1]; diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index 143e786..dc10b92 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -111,7 +111,7 @@ sub run_tests { $num_rescans++ if $self->{vendor} eq 'Firebird'; plan tests => @connect_info * - (203 + $num_rescans * $col_accessor_map_tests + $extra_count + ($self->{data_type_tests}{test_count} || 0)); + (203 + ($self->{skip_rels} ? 5 : $num_rescans * $col_accessor_map_tests) + $extra_count + ($self->{data_type_tests}{test_count} || 0)); foreach my $info_idx (0..$#connect_info) { my $info = $connect_info[$info_idx]; @@ -310,7 +310,7 @@ sub setup_schema { } else { $warn_count++; - is(scalar(@loader_warnings), $warn_count, "Expected loader warning") + is(scalar(@loader_warnings), $warn_count, "Expected loader warnings") or diag @loader_warnings; is(grep(/loader_test9 has no primary key/i, @loader_warnings), 1, "Missing PK warning"); @@ -565,7 +565,7 @@ sub test_schema { } SKIP: { - skip $self->{skip_rels}, 124 if $self->{skip_rels}; + skip $self->{skip_rels}, 132 if $self->{skip_rels}; my $moniker3 = $monikers->{loader_test3}; my $class3 = $classes->{loader_test3}; @@ -1822,7 +1822,7 @@ sub create { $dbh->do($_) foreach (@{ $self->{data_type_tests}{ddl} || [] }); } - unless($self->{skip_rels}) { + unless ($self->{skip_rels}) { # hack for now, since DB2 doesn't like inline comments, and we need # to test one for mysql, which works on everyone else... # this all needs to be refactored anyways. @@ -1947,7 +1947,7 @@ sub drop_tables { my $drop_auto_inc = $self->{auto_inc_drop_cb} || sub {}; - unless($self->{skip_rels}) { + unless ($self->{skip_rels}) { # drop the circular rel columns if possible, this # doesn't work on all DBs foreach my $table (keys %drop_columns) {