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 my $db = DBM::Deep->new(
39 type => DBM::Deep->TYPE_ARRAY,
43 my $temp_db = $db->[0];
44 for my $k ( 0 .. $max_levels ) {
46 $temp_db = $temp_db->[$k];
47 eval { $temp_db->isa( 'DBM::Deep' ) } or last;
49 is( $cur_level, $max_levels, "We read all the way down to level $cur_level" );
50 is( $temp_db->[0], "deepvalue", "And we retrieved the value at the bottom of the ocean" );