root/lang/perl/HTTP-Engine/trunk/t/010_core/request_processor-catch_error.t
@
17318
| Revision 17318, 341 bytes (checked in by tokuhirom, 5 years ago) |
|---|
| Line | |
|---|---|
| 1 | use strict; |
| 2 | use warnings; |
| 3 | use Test::More tests => 2; |
| 4 | use t::Utils; |
| 5 | use HTTP::Engine; |
| 6 | use HTTP::Request; |
| 7 | use IO::Scalar; |
| 8 | |
| 9 | tie *STDERR, 'IO::Scalar'; |
| 10 | |
| 11 | my $res = eval { |
| 12 | run_engine( |
| 13 | HTTP::Request->new( GET => 'http://localhost/'), |
| 14 | sub { |
| 15 | die "orz"; |
| 16 | }, |
| 17 | ); |
| 18 | }; |
| 19 | ok !$@; |
| 20 | is $res->code, 500; |
| 21 | |
| 22 | untie *STDERR; |
Note: See TracBrowser
for help on using the browser.
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)