/[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 14 by dpavlin, Sat Mar 21 23:36:26 2009 UTC revision 20 by dpavlin, Sun Mar 22 09:51:34 2009 UTC
# Line 3  Line 3 
3  use warnings;  use warnings;
4  use strict;  use strict;
5    
6  use Test::More tests => 52;  use Test::More tests => 56;
7    
8  use lib 'lib';  use lib 'lib';
9    
# Line 69  is_deeply( [ $o->keys('key-*') ], [ @key Line 69  is_deeply( [ $o->keys('key-*') ], [ @key
69  ok( my $key = $o->randomkey, 'randomkey' );  ok( my $key = $o->randomkey, 'randomkey' );
70  diag "key: $key";  diag "key: $key";
71    
72  ok( $o->rename( $key, 'test-renamed' ), 'rename' );  ok( $o->rename( 'test-incrby', 'test-renamed' ), 'rename' );
73  ok( $o->exists( 'test-renamed' ), 'exists test-renamed' );  ok( $o->exists( 'test-renamed' ), 'exists test-renamed' );
74    
75  eval { $o->rename( $o->randomkey, 'test-renamed', 1 ) };  eval { $o->rename( 'test-decrby', 'test-renamed', 1 ) };
76  ok( $@, 'rename to existing key' );  ok( $@, 'rename to existing key' );
77    
78    ok( my $nr_keys = $o->dbsize, 'dbsize' );
79    diag "dbsize: $nr_keys";
80    
81    diag "Commands operating on lists";
82    
83    ok( $o->rpush( 'test-list' => 'foo' ), 'rpush' );
84    
85    ok( $o->lpush( 'test-list' => 'foo' ), 'lpush' );
86    
87    cmp_ok( $o->llen('test-list'), '==', 2, 'llen' );
88    
89    
90  ok( $o->quit, 'quit' );  ok( $o->quit, 'quit' );

Legend:
Removed from v.14  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.26