clone 434344 -1
reassign -1 libmasonx-interp-withcallbacks-perl 1.16-1
retitle 434344 libhtml-mason-perl: missing dependency on libhtml-parser-perl
retitle -1 libmasonx-interp-withcallbacks-perl: change in HTML::Mason 1.36 
breaks the tests
tag -1 patch
thanks

On Mon, Jul 23, 2007 at 05:56:11PM +0200, Michael Ablassmeier wrote:
 
> adding libhtml-parser-perl to the packages Build-Depends (just as test) fixes
> the error above, but then some other tests fail:

>  >t/09cgi...............
>  >#   Failed test 'Handle simple callback request'
>  >#   in t/09cgi.t at line 127.
>  >
>  >#   Failed test 'Handle aborted callback request'
>  >#   in t/09cgi.t at line 143.
>  ># Looks like you failed 2 tests of 27.
>  >dubious
>  >        Test returned status 2 (wstat 512, 0x200)
>  >

There is indeed another problem here, due to this change in HTML::Mason 1.36:

    - Request::CGIHandler->exec() now returns the return value from
  executing the component, just like a normal Request. Reported by
  Adrian Irving-Beer.

This also changes the return code from
HTML::Mason::CGIHandler->handle_request() for two of the
test cases.  Before HTML::Mason 1.36, it happened to be 1 from
HTML::Mason::FakeApache::send_http_header().  Now the return code is
'undef', because t/htdocs/dhandler does not have an explicit 'return'
statement [1].

The suggested fix is to add an explicit 'return 200' (ie. HTTP OK)
into t/htdocs/dhandler.  This keeps the tests compatible with both the
old and the new HTML::Mason versions (on 1.35, send_http_header() turns
200 into 1, ie. still true.) Trivial patch attached.

BTW, Gunnar: your 'cache_self_expire_in' test failure comes
from the libhtml-mason-perl tests, not libmasonx-interp-withcallbacks-perl.
I can't reproduce it myself, though. Can you?

[1] The actual code that gets eval()'d from the component is generated
    by HTML::Mason::Compiler::ToObject, which puts an explicit void
    'return;' at the end (see the _body() routine) and thus always returns
    'undef'.

Cheers,
-- 
Niko Tyni   [EMAIL PROTECTED]
--- libmasonx-interp-withcallbacks-perl-1.16/t/htdocs/dhandler	2007/07/23 21:40:48	1.1
+++ libmasonx-interp-withcallbacks-perl-1.16/t/htdocs/dhandler	2007/07/23 21:40:55
@@ -1 +1,2 @@
 % $m->print(ref $ARGS{result} ? $ARGS{result}->($m) : $ARGS{result});
+% return 200;

Reply via email to