X-Git-Url: http://git.rot13.org/?p=perl-Redis.git;a=blobdiff_plain;f=t%2F01-Redis.t;h=242a863346c82aa80492d46a00dac8e8e8cfa695;hp=a27ae3734589b9b04020b0888a93b851e4e44ceb;hb=74f09579425ad6060edc98c31b7781b57c5fecde;hpb=63abbe056d199d6634093dbca16407b5070c0af0 diff --git a/t/01-Redis.t b/t/01-Redis.t index a27ae37..242a863 100755 --- a/t/01-Redis.t +++ b/t/01-Redis.t @@ -3,7 +3,7 @@ use warnings; use strict; -use Test::More tests => 49; +use Test::More tests => 53; use lib 'lib'; @@ -69,4 +69,13 @@ 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' ); + +eval { $o->rename( 'test-decrby', 'test-renamed', 1 ) }; +ok( $@, 'rename to existing key' ); + +ok( my $nr_keys = $o->dbsize, 'dbsize' ); +diag "dbsize: $nr_keys"; + ok( $o->quit, 'quit' );