Refactored to _descend to fix the recursion bug
[dbsrgits/DBM-Deep.git] / t / 32_dash_ell.t
1 #!/usr/bin/perl -l
2
3 # Test for interference from -l on the commandline.
4 use strict;
5 use warnings FATAL => 'all';
6
7 use Test::More;
8 use Test::Exception;
9 use t::common qw( new_fh );
10
11 use_ok( 'DBM::Deep' );
12
13 my ($fh, $filename) = new_fh();
14 my $db = DBM::Deep->new( $filename );
15
16 ##
17 # put/get key
18 ##
19 $db->{key1} = "value1";
20 is( $db->get("key1"), "value1", "get() works with hash assignment" );
21 is( $db->fetch("key1"), "value1", "... fetch() works with hash assignment" );
22 is( $db->{key1}, "value1", "... and hash-access also works" );
23
24 done_testing;