fixing tests. the rename test was broken, so I made it to detect a same-key rename... multi-bulk
authorJeremy Zawodny <Jeremy@Zawodny.com>
Fri, 2 Jul 2010 22:19:28 +0000 (15:19 -0700)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 28 Aug 2010 17:47:25 +0000 (19:47 +0200)
t/01-Redis.t

index 756135a..3eab8bb 100755 (executable)
@@ -86,8 +86,8 @@ ok( my $key = $o->randomkey, 'randomkey' );
 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' );
+eval { $o->rename( 'test-decrby', 'test-decrby' ) };
+ok( $@, 'rename to same key' );
 
 ok( my $nr_keys = $o->dbsize, 'dbsize' );
 
@@ -173,7 +173,7 @@ ok( $o->lpush( 'test-sort', $_ ), "put $_" ) foreach ( 1 .. 4 );
 cmp_ok( $o->llen( 'test-sort' ), '==', 4, 'llen' );
 
 is_deeply( [ $o->sort( 'test-sort' )      ], [ 1,2,3,4 ], 'sort' );
-is_deeply( [ $o->sort( 'test-sort DESC' ) ], [ 4,3,2,1 ], 'sort DESC' );
+is_deeply( [ $o->sort( 'test-sort', 'DESC' )      ], [ 4,3,2,1 ], 'sort DESC' );
 
 
 diag "Persistence control commands";