From: John Napiorkowski Date: Mon, 8 Oct 2012 20:35:41 +0000 (-0400) Subject: fix for the way the sqlite storage works in DBIC 0.08200 X-Git-Tag: 1.001017~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=885f16cb813dbf04a09029303b7f40bf2fd53d2f;p=dbsrgits%2FDBIx-Class-Fixtures.git fix for the way the sqlite storage works in DBIC 0.08200 --- diff --git a/Changes b/Changes index 1154bad..6a737bb 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for DBIx-Class-Fixtures +1.001017 +- Changed the test suite so it doesn't mindlessly break with the changes + introduced by DBIC 0.08200. + 1.001016 - Support more Postgresql types for datetime_relative (added TIME, DATE, INTERVAL, TIMESTAMP) diff --git a/lib/DBIx/Class/Fixtures.pm b/lib/DBIx/Class/Fixtures.pm index 5005c40..4fe0470 100644 --- a/lib/DBIx/Class/Fixtures.pm +++ b/lib/DBIx/Class/Fixtures.pm @@ -26,7 +26,7 @@ our $namespace_counter = 0; __PACKAGE__->mk_group_accessors( 'simple' => qw/config_dir _inherited_attributes debug schema_class dumped_objects config_attrs/); -our $VERSION = '1.001016'; +our $VERSION = '1.001017'; =head1 NAME diff --git a/t/lib/DBICTest.pm b/t/lib/DBICTest.pm index c72426c..bcbacba 100755 --- a/t/lib/DBICTest.pm +++ b/t/lib/DBICTest.pm @@ -101,7 +101,17 @@ sub deploy_schema { my $sql; { local $/ = undef; $sql = ; } close IN; - ($schema->storage->dbh->do($_) || print "Error on SQL: $_\n") for split(/;\n/, $sql); + + foreach my $line (split(/;\n/, $sql)) { + print "$line\n"; + next if(!$line); + next if($line =~ /^--/); + next if($line =~ /^BEGIN TRANSACTION/m); + next if($line =~ /^COMMIT/m); + next if $line =~ /^\s+$/; # skip whitespace only + + $schema->storage->dbh->do($line) || print "Error on SQL: $line\n"; + } }