/[Redis.pre-github]/t/01-Redis.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /t/01-Redis.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 37 by dpavlin, Sun Mar 22 17:37:46 2009 UTC revision 38 by dpavlin, Sun Mar 22 18:17:05 2009 UTC
# Line 3  Line 3 
3  use warnings;  use warnings;
4  use strict;  use strict;
5    
6  use Test::More tests => 86;  use Test::More tests => 88;
7    
8  use lib 'lib';  use lib 'lib';
9    
# Line 15  ok( my $o = Redis->new(), 'new' ); Line 15  ok( my $o = Redis->new(), 'new' );
15    
16  ok( $o->ping, 'ping' );  ok( $o->ping, 'ping' );
17    
18    diag "Commands operating on string values";
19    
20  ok( $o->set( foo => 'bar' ), 'set foo => bar' );  ok( $o->set( foo => 'bar' ), 'set foo => bar' );
21    
22  eval { $o->set( foo => 'bar', 1 ) };  eval { $o->set( foo => 'bar', 1 ) };
# Line 115  cmp_ok( $o->lpop( $list ), 'eq', 'r1', ' Line 117  cmp_ok( $o->lpop( $list ), 'eq', 'r1', '
117    
118  ok( ! $o->rpop( $list ), 'rpop' );  ok( ! $o->rpop( $list ), 'rpop' );
119    
120  # Commands operating on sets  
121    diag "Commands operating on sets";
122    
123  my $set = 'test-set';  my $set = 'test-set';
124  $o->del($set);  $o->del($set);
# Line 142  ok( $o->sinterstore( 'test-set-inter', ' Line 145  ok( $o->sinterstore( 'test-set-inter', '
145    
146  cmp_ok( $o->scard( 'test-set-inter' ), '==', $#$inter + 1, 'cardinality of intersection' );  cmp_ok( $o->scard( 'test-set-inter' ), '==', $#$inter + 1, 'cardinality of intersection' );
147    
148    
149    diag "Multiple databases handling commands";
150    
151    ok( $o->select( 1 ), 'select' );
152    ok( $o->select( 0 ), 'select' );
153    
154    
155    diag "Connection handling";
156    
157  ok( $o->quit, 'quit' );  ok( $o->quit, 'quit' );

Legend:
Removed from v.37  
changed lines
  Added in v.38

  ViewVC Help
Powered by ViewVC 1.1.26