# HG changeset patch # User Maxim Dounin # Date 1234872180 -10800 # Node ID 24143894b91b9958f29827bd5cab2a8d1b27ca3b # Parent 4715bd4d469301303679085249908f63e536e88f Tests: shut up warnings for TODO tests. Recent versions of Test::Simple/More/Builder (0.61+) throw warnings on undef in like(). While this is good for working tests, it's not for TODO ones. Other tricky part is that neither "no warnings" pragma nor $^W can be used to avoid warnings. The only way that works is to redefine $SIG{__WARN__}. diff --git a/proxy-noclose.t b/proxy-noclose.t --- a/proxy-noclose.t +++ b/proxy-noclose.t @@ -79,6 +79,7 @@ EOF TODO: { local $TODO = 'not fixed yet, patches under review'; +local $SIG{__WARN__} = sub {}; like(http_get('/'), qr/SEE-THIS/, 'request to bad backend'); like(http_get('/multi'), qr/AND-THIS/, 'bad backend - multiple packets'); diff --git a/smtp.t b/smtp.t --- a/smtp.t +++ b/smtp.t @@ -143,6 +143,7 @@ my $s = Test::Nginx::SMTP->new(); TODO: { local $TODO = 'pipelining not in official nginx'; +local $SIG{__WARN__} = sub {}; $s = Test::Nginx::SMTP->new(); $s->read(); @@ -199,6 +200,7 @@ local $TODO = 'pipelining not in officia TODO: { local $TODO = 'pipelining not in official nginx'; +local $SIG{__WARN__} = sub {}; $s->ok('pipelined rcpt to'); $s->ok('pipelined rset');