7 plan skip_all => "You must set \$ENV{LONG_TESTS} to run the long tests"
8 unless $ENV{LONG_TESTS};
11 use t::common qw( new_fh );
13 diag "This test can take up to a minute to run. Please be patient.";
15 use_ok( 'DBM::Deep' );
17 my ($fh, $filename) = new_fh();
19 my $max_levels = 1000;
22 my $db = DBM::Deep->new(
25 type => DBM::Deep->TYPE_ARRAY,
29 my $temp_db = $db->[0];
30 for my $k ( 0 .. $max_levels ) {
32 $temp_db = $temp_db->[$k];
34 $temp_db->[0] = "deepvalue";
38 open $fh, '+<', $filename;
39 my $db = DBM::Deep->new(
42 type => DBM::Deep->TYPE_ARRAY,
46 my $temp_db = $db->[0];
47 for my $k ( 0 .. $max_levels ) {
49 $temp_db = $temp_db->[$k];
50 eval { $temp_db->isa( 'DBM::Deep' ) } or last;
52 is( $cur_level, $max_levels, "We read all the way down to level $cur_level" );
53 is( $temp_db->[0], "deepvalue", "And we retrieved the value at the bottom of the ocean" );