AnyEvent-Redis-RipeRedis

 view release on metacpan or  search on metacpan

t/04-commands.t  view on Meta::CPAN

569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
  );
 
  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

594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
  );
 
  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

777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
  );
 
  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

802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
  );
 
  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 )