about summary refs log tree commit homepage
path: root/xt/pop3d-mpop.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-01-30 22:50:07 +0000
committerEric Wong <e@80x24.org>2023-01-31 00:27:05 +0000
commit5dbb060037ce3e3a3ba0812baa90c80eeee762af (patch)
tree4c61aef7f5822ede45c8c352320ed8bc5b7492b8 /xt/pop3d-mpop.t
parent155ee9cdaffd6232ef3c774d1a9f61d708fc8d6e (diff)
downloadpublic-inbox-5dbb060037ce3e3a3ba0812baa90c80eeee762af.tar.gz
We'll rely on defined(wantarray) to implicitly skip subtests,
and memoize these to reduce syscalls, since tests should
be short-lived enough to not be affected by new installations or
removals of git/xapian-compact/curl/etc...
Diffstat (limited to 'xt/pop3d-mpop.t')
-rw-r--r--xt/pop3d-mpop.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/xt/pop3d-mpop.t b/xt/pop3d-mpop.t
index 8648b953..fc82bc6b 100644
--- a/xt/pop3d-mpop.t
+++ b/xt/pop3d-mpop.t
@@ -5,12 +5,13 @@
 use v5.12;
 use File::Path qw(make_path);
 use PublicInbox::TestCommon;
-use PublicInbox::Spawn qw(which spawn);
+use PublicInbox::Spawn qw(spawn);
 my $inboxdir = $ENV{GIANT_INBOX_DIR};
 (defined($inboxdir) && -d $inboxdir) or
         plan skip_all => "GIANT_INBOX_DIR not defined for $0";
 plan skip_all => "bad characters in $inboxdir" if $inboxdir =~ m![^\w\.\-/]!;
-my $uuidgen = which('uuidgen') or plan skip_all => 'uuidgen(1) missing';
+my $uuidgen = require_cmd('uuidgen');
+my $mpop = require_cmd('mpop');
 require_mods(qw(DBD::SQLite));
 require_git('2.6'); # for v2
 require_mods(qw(File::FcntlLock)) if $^O !~ /\A(?:linux|freebsd)\z/;
@@ -41,8 +42,7 @@ chomp(my $uuid = xqx([$uuidgen]));
 make_path("$tmpdir/home/.config/mpop",
         map { "$tmpdir/md/$_" } qw(new cur tmp));
 
-SKIP: {
-        my $mpop = which('mpop') or skip('mpop(1) missing', 1);
+{
         open my $fh, '>', "$tmpdir/home/.config/mpop/config"
                 or xbail "open $!";
         chmod 0600, $fh;