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/nntpd.t | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 't/nntpd.t') diff --git a/t/nntpd.t b/t/nntpd.t index 3c928610..5b697344 100644 --- a/t/nntpd.t +++ b/t/nntpd.t @@ -13,7 +13,6 @@ require PublicInbox::InboxWritable; use Email::Simple; use IO::Socket; use Socket qw(IPPROTO_TCP TCP_NODELAY); -use File::Temp qw/tempdir/; use Net::NNTP; use Sys::Hostname; require './t/common.perl'; @@ -22,7 +21,7 @@ require './t/common.perl'; my $version = $ENV{PI_TEST_VERSION} || 2; require_git('2.6') if $version == 2; -my $tmpdir = tempdir('pi-nntpd-XXXXXX', TMPDIR => 1, CLEANUP => 1); +my ($tmpdir, $for_destroy) = tmpdir(); my $home = "$tmpdir/pi-home"; my $err = "$tmpdir/stderr.log"; my $out = "$tmpdir/stdout.log"; -- cgit v1.2.3-24-ge0c7