# 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');