X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F01generate.t;h=7ab35b2878bc10d4ae8794409933737cc61de15a;hb=c671eba6c2751d65437e394d7061038826a912e0;hp=008c7ca56a1a17d9acfc3088c405f34d938a5ba5;hpb=74156ee902717f09df7ffa18318a99859a30c5a5;p=scpubgit%2FQ-Branch.git diff --git a/t/01generate.t b/t/01generate.t index 008c7ca..7ab35b2 100644 --- a/t/01generate.t +++ b/t/01generate.t @@ -16,12 +16,6 @@ use SQL::Abstract; # ################# -# DBIx::Class requires a nest warning to be emitted once but the private -# method it overrode to do so no longer exists; here we cancel said warning -# to avoid disturbing the SQLA tests - -$SQL::Abstract::Nest_Warning_Emitted++; - my @tests = ( { func => 'select', @@ -636,6 +630,13 @@ my @tests = ( stmt_q => 'DELETE FROM `test` WHERE ( `requestor` IS NULL ) RETURNING `id`, `created_at`', bind => [] }, + { + func => 'delete', + args => ['test', \[ undef ] ], + stmt => 'DELETE FROM test', + stmt_q => 'DELETE FROM `test`', + bind => [] + }, ); # check is( not) => undef @@ -869,6 +870,13 @@ for my $t (@tests) { } else { lives_ok(sub { + alarm(1); local $SIG{ALRM} = sub { + no warnings 'redefine'; + my $orig = Carp->can('caller_info'); + local *Carp::caller_info = sub { return if $_[0] > 20; &$orig }; + print STDERR "ARGH ($SQL::Abstract::Default_Scalar_To): ".Carp::longmess(); + die "timed out"; + }; warnings_like( sub { $cref->() }, $t->{warns} || [],