--- t/01-Redis.t 2009/03/23 11:30:40 47 +++ t/01-Redis.t 2009/03/23 11:33:21 48 @@ -3,7 +3,7 @@ use warnings; use strict; -use Test::More tests => 102; +use Test::More tests => 103; use lib 'lib'; @@ -15,6 +15,7 @@ ok( $o->ping, 'ping' ); + diag "Commands operating on string values"; ok( $o->set( foo => 'bar' ), 'set foo => bar' ); @@ -77,7 +78,6 @@ is_deeply( [ $o->keys('key-*') ], [ @keys ], 'keys' ); ok( my $key = $o->randomkey, 'randomkey' ); -diag "key: $key"; ok( $o->rename( 'test-incrby', 'test-renamed' ), 'rename' ); ok( $o->exists( 'test-renamed' ), 'exists test-renamed' ); @@ -86,7 +86,7 @@ ok( $@, 'rename to existing key' ); ok( my $nr_keys = $o->dbsize, 'dbsize' ); -diag "dbsize: $nr_keys"; + diag "Commands operating on lists"; @@ -162,6 +162,7 @@ ok( $o->flushdb, 'flushdb' ); cmp_ok( $o->dbsize, '==', 0, 'empty' ); + diag "Sorting"; ok( $o->lpush( 'test-sort', $_ ), "put $_" ) foreach ( 1 .. 4 ); @@ -170,6 +171,12 @@ is_deeply( [ $o->sort( 'test-sort' ) ], [ 1,2,3,4 ], 'sort' ); is_deeply( [ $o->sort( 'test-sort DESC' ) ], [ 4,3,2,1 ], 'sort DESC' ); + +diag "Persistence control commands"; + +ok( $o->save, 'save' ); + + diag "Connection handling"; ok( $o->quit, 'quit' );