From: Peter Rabbitson Date: Fri, 24 Oct 2008 13:21:40 +0000 (+0000) Subject: Count warnings differently, as SQLT produces some weird stuff under 5.10. All of... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7a0637410a68a8e904a12f85c52b2fd1e2c7b1d7;p=dbsrgits%2FDBIx-Class-Historic.git Count warnings differently, as SQLT produces some weird stuff under 5.10. All of this will be fixed after the test refactor --- diff --git a/t/94versioning.t b/t/94versioning.t index 92e465c..4ef0864 100644 --- a/t/94versioning.t +++ b/t/94versioning.t @@ -82,7 +82,14 @@ my $schema_upgrade = DBICVersion::Schema->connect($dsn, $user, $pass, { ignore_v # should overwrite files and warn about it my @w; - local $SIG{__WARN__} = sub { push @w, shift }; + local $SIG{__WARN__} = sub { + if ($_[0] =~ /^Overwriting/) { + push @w, $_[0]; + } + else { + warn @_; + } + }; $schema_upgrade->create_ddl_dir('MySQL', '2.0', $ddl_dir, '1.0'); is (2, @w, 'A warning generated for both the DDL and the diff');