/[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 23 by dpavlin, Sun Mar 22 13:09:15 2009 UTC revision 25 by dpavlin, Sun Mar 22 13:20:34 2009 UTC
# Line 3  Line 3 
3  use warnings;  use warnings;
4  use strict;  use strict;
5    
6  use Test::More tests => 64;  use Test::More tests => 67;
7    
8  use lib 'lib';  use lib 'lib';
9    
# Line 88  ok( $o->rpush( $list => "r$_" ), 'rpush' Line 88  ok( $o->rpush( $list => "r$_" ), 'rpush'
88    
89  ok( $o->lpush( $list => "l$_" ), 'lpush' ) foreach ( 1 .. 2 );  ok( $o->lpush( $list => "l$_" ), 'lpush' ) foreach ( 1 .. 2 );
90    
91    cmp_ok( $o->type($list), 'eq', 'list', 'type' );
92  cmp_ok( $o->llen($list), '==', 5, 'llen' );  cmp_ok( $o->llen($list), '==', 5, 'llen' );
93    
94  is_deeply( [ $o->lrange( $list, 0, 1 ) ], [ 'l2', 'l1' ], 'lrange' );  is_deeply( [ $o->lrange( $list, 0, 1 ) ], [ 'l2', 'l1' ], 'lrange' );
# Line 98  cmp_ok( $o->llen($list), '==', 2, 'llen Line 99  cmp_ok( $o->llen($list), '==', 2, 'llen
99  cmp_ok( $o->lindex( $list, 0 ), 'eq', 'l1', 'lindex' );  cmp_ok( $o->lindex( $list, 0 ), 'eq', 'l1', 'lindex' );
100  cmp_ok( $o->lindex( $list, 1 ), 'eq', 'r1', 'lindex' );  cmp_ok( $o->lindex( $list, 1 ), 'eq', 'r1', 'lindex' );
101    
102    ok( $o->lset( $list, 0, 'foo' ), 'lset' );
103    cmp_ok( $o->lindex( $list, 0 ), 'eq', 'foo', 'verified' );
104    
105  ok( $o->quit, 'quit' );  ok( $o->quit, 'quit' );

Legend:
Removed from v.23  
changed lines
  Added in v.25

  ViewVC Help
Powered by ViewVC 1.1.26