5 use Test::More tests => 2;
6 use t::common qw( new_fh );
12 my ($fh, $filename) = new_fh();
13 my $db = DBM::Deep->new( $filename );
16 # Create structure in DB
21 array1 => [ "elem0", "elem1", "elem2", { foo => 'bar' }, [ 5 ] ],
23 subkey1 => "subvalue1",
24 subkey2 => "subvalue2",
31 $struct = $db->export();
35 # Make sure everything is here, outside DB
38 ($struct->{key1} eq "value1") &&
39 ($struct->{key2} eq "value2") &&
41 ($struct->{array1}->[0] eq "elem0") &&
42 ($struct->{array1}->[1] eq "elem1") &&
43 ($struct->{array1}->[2] eq "elem2") &&
44 ($struct->{array1}->[3]{foo} eq "bar") &&
45 ($struct->{array1}->[4][0] eq "5")
48 ($struct->{hash1}->{subkey1} eq "subvalue1") &&
49 ($struct->{hash1}->{subkey2} eq "subvalue2")