comparison proxy-noclose.t @ 72:24143894b91b

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__}.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 17 Feb 2009 15:03:00 +0300
parents 726c3c2a8b8c
children 6e5884419e4a
comparison
equal deleted inserted replaced
71:4715bd4d4693 72:24143894b91b
77 77
78 ############################################################################### 78 ###############################################################################
79 79
80 TODO: { 80 TODO: {
81 local $TODO = 'not fixed yet, patches under review'; 81 local $TODO = 'not fixed yet, patches under review';
82 local $SIG{__WARN__} = sub {};
82 83
83 like(http_get('/'), qr/SEE-THIS/, 'request to bad backend'); 84 like(http_get('/'), qr/SEE-THIS/, 'request to bad backend');
84 like(http_get('/multi'), qr/AND-THIS/, 'bad backend - multiple packets'); 85 like(http_get('/multi'), qr/AND-THIS/, 'bad backend - multiple packets');
85 like(http_get('/nolen'), qr/SEE-THIS/, 'bad backend - no content length'); 86 like(http_get('/nolen'), qr/SEE-THIS/, 'bad backend - no content length');
86 like(http_get('/uselen'), qr/SEE-THIS/, 'content-length actually used'); 87 like(http_get('/uselen'), qr/SEE-THIS/, 'content-length actually used');