--- t/01-Redis.t 2009/03/22 09:22:39 17 +++ t/01-Redis.t 2009/03/22 10:36:22 21 @@ -3,7 +3,7 @@ use warnings; use strict; -use Test::More tests => 53; +use Test::More tests => 56; use lib 'lib'; @@ -78,4 +78,14 @@ ok( my $nr_keys = $o->dbsize, 'dbsize' ); diag "dbsize: $nr_keys"; +diag "Commands operating on lists"; + +ok( $o->rpush( 'test-list' => "r$_" ), 'rpush' ) foreach ( 1 .. 3 ); + +ok( $o->lpush( 'test-list' => "l$_" ), 'lpush' ) foreach ( 1 .. 2 ); + +cmp_ok( $o->llen('test-list'), '==', 2, 'llen' ); + +is_deeply( [ $o->lrange( 'test-list', 0, 1 ) ], [ 'l2', 'l1' ], 'lrange' ); + ok( $o->quit, 'quit' );