3 |
use warnings; |
use warnings; |
4 |
use strict; |
use strict; |
5 |
|
|
6 |
use Test::More tests => 95; |
use Test::More tests => 102; |
7 |
|
|
8 |
use lib 'lib'; |
use lib 'lib'; |
9 |
|
|
162 |
ok( $o->flushdb, 'flushdb' ); |
ok( $o->flushdb, 'flushdb' ); |
163 |
cmp_ok( $o->dbsize, '==', 0, 'empty' ); |
cmp_ok( $o->dbsize, '==', 0, 'empty' ); |
164 |
|
|
165 |
|
diag "Sorting"; |
166 |
|
|
167 |
|
ok( $o->lpush( 'test-sort', $_ ), "put $_" ) foreach ( 1 .. 4 ); |
168 |
|
cmp_ok( $o->llen( 'test-sort' ), '==', 4, 'llen' ); |
169 |
|
|
170 |
|
is_deeply( [ $o->sort( 'test-sort' ) ], [ 1,2,3,4 ], 'sort' ); |
171 |
|
is_deeply( [ $o->sort( 'test-sort DESC' ) ], [ 4,3,2,1 ], 'sort DESC' ); |
172 |
|
|
173 |
diag "Connection handling"; |
diag "Connection handling"; |
174 |
|
|
175 |
ok( $o->quit, 'quit' ); |
ok( $o->quit, 'quit' ); |