AnyEvent-Redis-RipeRedis
view release on metacpan or search on metacpan
t/04-commands.t view on Meta::CPAN
569570571572573574575576577578579580581582583584585586587588589
);
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
594595596597598599600601602603604605606607608609610611612613
);
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
777778779780781782783784785786787788789790791792793794795796797
);
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
802803804805806807808809810811812813814815816817818819820821
);
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 0.366 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )