use strict;
-use Test::More tests => 89;
+use Test::More tests => 91;
use Test::Deep;
use t::common qw( new_fh );
cmp_bag( [ keys %$db2 ], [qw( foo z )], "DB2 keys correct" );
SKIP: {
- skip "Optimize has issues right now", 5;
skip "Optimize tests skipped on Win32", 5
if $^O eq 'MSWin32' || $^O eq 'cygwin';
is( $db1->{foo}, 'bar', 'After optimize, everything is ok' );
is( $db2->{foo}, 'bar', 'After optimize, everything is ok' );
- cmp_bag( [ keys %$db1 ], [qw( foo )], "DB1 keys correct" );
- cmp_bag( [ keys %$db2 ], [qw( foo )], "DB2 keys correct" );
+ is( $db1->{z}, 'a', 'After optimize, everything is ok' );
+ is( $db2->{z}, 'a', 'After optimize, everything is ok' );
+
+ cmp_bag( [ keys %$db1 ], [qw( foo z )], "DB1 keys correct" );
+ cmp_bag( [ keys %$db2 ], [qw( foo z )], "DB2 keys correct" );
$db1->begin_work;
- cmp_ok( $db1->_storage->transaction_id, '==', 1, "Transaction ID has been reset after optimize" );
+ cmp_ok( $db1->_engine->trans_id, '==', 1, "Transaction ID has been reset after optimize" );
$db1->rollback;
}