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/import.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/import.t') diff --git a/t/import.t b/t/import.t index d309eec5..2f5b08a5 100644 --- a/t/import.t +++ b/t/import.t @@ -9,9 +9,9 @@ use PublicInbox::Import; use PublicInbox::Spawn qw(spawn); use IO::File; use Fcntl qw(:DEFAULT); -use File::Temp qw/tempdir tempfile/; -my $dir = tempdir('pi-import-XXXXXX', TMPDIR => 1, CLEANUP => 1); +use File::Temp qw/tempfile/; require './t/common.perl'; +my ($dir, $for_destroy) = tmpdir(); is(system(qw(git init -q --bare), $dir), 0, 'git init successful'); my $git = PublicInbox::Git->new($dir); -- cgit v1.2.3-24-ge0c7