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(
24 type => DBM::Deep->TYPE_ARRAY,
28 my $temp_db = $db->[0];
29 for my $k ( 0 .. $max_levels ) {
31 $temp_db = $temp_db->[$k];
33 $temp_db->[0] = "deepvalue";
37 open $fh, '+<', $filename;
38 my $db = DBM::Deep->new(
40 type => DBM::Deep->TYPE_ARRAY,
44 my $temp_db = $db->[0];
45 for my $k ( 0 .. $max_levels ) {
47 $temp_db = $temp_db->[$k];
48 eval { $temp_db->isa( 'DBM::Deep' ) } or last;
50 is( $cur_level, $max_levels, "We read all the way down to level $cur_level" );
51 is( $temp_db->[0], "deepvalue", "And we retrieved the value at the bottom of the ocean" );