3 |
use warnings; |
use warnings; |
4 |
use strict; |
use strict; |
5 |
|
|
6 |
use Test::More tests => 49; |
use Test::More tests => 52; |
7 |
|
|
8 |
use lib 'lib'; |
use lib 'lib'; |
9 |
|
|
69 |
ok( my $key = $o->randomkey, 'randomkey' ); |
ok( my $key = $o->randomkey, 'randomkey' ); |
70 |
diag "key: $key"; |
diag "key: $key"; |
71 |
|
|
72 |
|
ok( $o->rename( $key, 'test-renamed' ), 'rename' ); |
73 |
|
ok( $o->exists( 'test-renamed' ), 'exists test-renamed' ); |
74 |
|
|
75 |
|
eval { $o->rename( $o->randomkey, 'test-renamed', 1 ) }; |
76 |
|
ok( $@, 'rename to existing key' ); |
77 |
|
|
78 |
ok( $o->quit, 'quit' ); |
ok( $o->quit, 'quit' ); |