From ad6f26f3b9f0e428020d05667987556f8fcbec2f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 24 Nov 2019 00:22:34 +0000 Subject: tests: use File::Temp->newdir instead of tempdir() We'll also introduce a tmpdir() API to give tempdirs consistent names. --- t/msgmap.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/msgmap.t') diff --git a/t/msgmap.t b/t/msgmap.t index f1250bca..7fcd131a 100644 --- a/t/msgmap.t +++ b/t/msgmap.t @@ -3,7 +3,7 @@ use strict; use warnings; use Test::More; -use File::Temp qw/tempdir/; +require './t/common.perl'; foreach my $mod (qw(DBD::SQLite)) { eval "require $mod"; @@ -11,7 +11,7 @@ foreach my $mod (qw(DBD::SQLite)) { } use_ok 'PublicInbox::Msgmap'; -my $tmpdir = tempdir('pi-msgmap-XXXXXX', TMPDIR => 1, CLEANUP => 1); +my ($tmpdir, $for_destroy) = tmpdir(); my $d = PublicInbox::Msgmap->new($tmpdir, 1); my %mid2num; -- cgit v1.2.3-24-ge0c7