better results from 01generate when a test unexpecteedly dies
Matt S Trout [Fri, 7 Sep 2018 22:47:24 +0000 (22:47 +0000)]
t/01generate.t

index ebe3aad..5437493 100644 (file)
@@ -850,10 +850,12 @@ for my $t (@tests) {
       ) || diag dumper({ args => $t->{args}, result => $stmt });
     }
     else {
-      warnings_like(
-        sub { $cref->() },
-        $t->{warns} || [],
-      ) || diag dumper({ args => $t->{args}, result => $stmt });
+      lives_ok(sub {
+        warnings_like(
+          sub { $cref->() },
+          $t->{warns} || [],
+        ) || diag dumper({ args => $t->{args}, result => $stmt });
+      }) || diag dumper({ args => $t->{args}, result => $stmt, threw => $@ });
 
       is_same_sql_bind(
         $stmt,