From: Dagfinn Ilmari Mannsåker Date: Fri, 3 Jan 2014 18:26:01 +0000 (+0100) Subject: Check for extra warnings, and diag input and output X-Git-Tag: v1.77~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5eccd8f08ffd024b337650369ba4afadc05bd5bf;p=dbsrgits%2FSQL-Abstract.git Check for extra warnings, and diag input and output We want to test the _lack_ of warnings as well, and having the input and output is handy for figuring out what's wrong. --- diff --git a/t/01generate.t b/t/01generate.t index e3737ff..7e641f7 100644 --- a/t/01generate.t +++ b/t/01generate.t @@ -655,10 +655,10 @@ for my $t (@tests) { ) || diag dumper ({ args => $t->{args}, result => $stmt }); } else { - warnings_exist( + warnings_like( sub { $cref->() }, $t->{warns} || [], - ); + ) || diag dumper ({ args => $t->{args}, result => $stmt }); is_same_sql_bind( $stmt,