Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 9ddda67de4
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (14 sloc) 0.41 kb
use Test::Base;
use Test::TCP;
plan tests => 2;
my $port = empty_port;
use AnyEvent::JSONRPC::Lite;
my $server = jsonrpc_server undef, $port;
$server->reg_cb( error => sub {
shift->error('error message!');
});
my $client = jsonrpc_client '127.0.0.1', $port;
my $res;
eval { $res = $client->call('error')->recv };
ok !$res, '$res is not set ok';
like $@, qr/^error message! at /, 'error message ok';
Jump to Line
Something went wrong with that request. Please try again.