1 # This test (and accompanying patch) was submitted by Father Chrysostomos (sprout@cpan.org)
6 use warnings FATAL => 'all';
8 use Test::More tests => 5;
10 use t::common qw( new_fh );
12 use_ok( 'DBM::Deep' );
15 my ($fh, $filename) = new_fh();
16 my $db = DBM::Deep->new( $filename );
19 for ( # the checksums of all these begin with ^@:
20 qw/ s340l 1970 thronos /,
21 "\320\277\320\276\320\262\320\265\320\273\320\265\320\275".
22 "\320\275\320\276\320\265", qw/ mr094 despite
23 geographically binding bed handmaiden infer lela infranarii
24 lxv evtropia recognizes maladies /
29 }, '2 indices can be created at once';
31 is_deeply [sort keys %$db], [ sort
32 qw/ s340l 1970 thronos /,
33 "\320\277\320\276\320\262\320\265\320\273\320\265\320\275".
34 "\320\275\320\276\320\265", qw/ mr094 despite
35 geographically binding bed handmaiden infer lela infranarii
36 lxv evtropia recognizes maladies /
37 ], 'and the keys were stored correctly';
41 my ($fh, $filename) = new_fh();
42 my $db = DBM::Deep->new( $filename );
45 for ( # the checksums of all these begin with ^@^@^@:
46 qw/ dzqtz aqkdqz cxzysd czclmy ktajsi kvlybo kyxowd lvlsda
47 lyzfdi mbethb mcoqeq VMPJC ATZMZZ AXXJDX BXUUFN EIVTII
48 FMOKOI HITVDG JSSJSZ JXQPFK LCVVXW /
53 }, 'multiple nested indices can be created at once';
55 is_deeply [sort keys %$db], [ sort
56 qw/ dzqtz aqkdqz cxzysd czclmy ktajsi kvlybo kyxowd lvlsda
57 lyzfdi mbethb mcoqeq VMPJC ATZMZZ AXXJDX BXUUFN EIVTII
58 FMOKOI HITVDG JSSJSZ JXQPFK LCVVXW /
59 ], 'and the keys were stored correctly';