AnyEvent-Redis-RipeRedis
view release on metacpan or search on metacpan
t/04-commands.t view on Meta::CPAN
);
is( $t_reply, 'ÐнаÑение', "GET; 'on_reply' used; UTF-8 string" );
return;
}
sub t_get_non_existent_mth1 {
my $redis = shift;
my $t_reply = 'not_undef';
ev_loop(
sub {
my $cv = shift;
$redis->get( 'non_existent',
{ on_done => sub {
$t_reply = shift;
$cv->send();
t/04-commands.t view on Meta::CPAN
);
is( $t_reply, undef, "GET; 'on_done' used; non existent key" );
return;
}
sub t_get_non_existent_mth2 {
my $redis = shift;
my $t_reply = 'not_undef';
my $t_err_msg;
ev_loop(
sub {
my $cv = shift;
$redis->get( 'non_existent',
sub {
$t_reply = shift;
t/04-commands.t view on Meta::CPAN
);
is_deeply( $t_reply, [], "LRANGE; 'on_reply' used; empty list" );
return;
}
sub t_mbulk_reply_undef_mth1 {
my $redis = shift;
my $t_reply = 'not_undef';
ev_loop(
sub {
my $cv = shift;
$redis->brpop( 'non_existent', '1',
{ on_done => sub {
$t_reply = shift;
$cv->send();
t/04-commands.t view on Meta::CPAN
);
is( $t_reply, undef, "BRPOP; 'on_done' used; multi-bulk undef" );
return;
}
sub t_mbulk_reply_undef_mth2 {
my $redis = shift;
my $t_reply = 'not_undef';
my $t_err_msg;
ev_loop(
sub {
my $cv = shift;
$redis->brpop( 'non_existent', '1',
sub {
$t_reply = shift;
( run in 1.164 second using v1.01-cache-2.11-cpan-0a987023a57 )