X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F25_tie_return_value.t;h=33943f3aa50ea655d2818276aef1ea444bca1718;hb=5c0756fcb3b5c7ca76c52be6c7c9d78841e5d57b;hp=4e4d869581fff4920bb0ad3945e737634b16c69d;hpb=995d119bda08f082909eff64e01328d41af7bd21;p=dbsrgits%2FDBM-Deep.git diff --git a/t/25_tie_return_value.t b/t/25_tie_return_value.t index 4e4d869..33943f3 100644 --- a/t/25_tie_return_value.t +++ b/t/25_tie_return_value.t @@ -1,25 +1,26 @@ use strict; use Test::More tests => 5; - -use Scalar::Util qw( reftype ); +use t::common qw( new_fh ); use_ok( 'DBM::Deep' ); +use Scalar::Util qw( reftype ); + { - unlink "t/test.db"; + my ($fh, $filename) = new_fh(); my %hash; - my $obj = tie %hash, 'DBM::Deep', 't/test.db'; + my $obj = tie %hash, 'DBM::Deep', $filename; isa_ok( $obj, 'DBM::Deep' ); is( reftype( $obj ), 'HASH', "... and its underlying representation is an HASH" ); } { - unlink "t/test.db"; + my ($fh, $filename) = new_fh(); my @array; - my $obj = tie @array, 'DBM::Deep', 't/test.db'; + my $obj = tie @array, 'DBM::Deep', $filename; isa_ok( $obj, 'DBM::Deep' ); - is( reftype( $obj ), 'ARRAY', "... and its underlying representation is an ARRAY" ); + is( reftype( $obj ), 'HASH', "... and its underlying representation is an HASH" ); }