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)

use run_engine.

Line 
1use strict;
2use warnings;
3use Test::More tests => 2;
4use t::Utils;
5use HTTP::Engine;
6use HTTP::Request;
7use IO::Scalar;
8
9tie *STDERR, 'IO::Scalar';
10
11my $res = eval {
12    run_engine(
13        HTTP::Request->new( GET => 'http://localhost/'),
14        sub {
15            die "orz";
16        },
17    );
18};
19ok !$@;
20is $res->code, 500;
21
22untie *STDERR;
Note: See TracBrowser for help on using the browser.