about summary refs log tree commit homepage
path: root/t/lei.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-13 20:53:50 +0000
committerEric Wong <e@80x24.org>2021-09-13 21:11:13 +0000
commit04657044bb3695d70298624eb25394fb864fb718 (patch)
treefce610c4e7c2b3a7287d9a3cbde42bfc2ff36bfa /t/lei.t
parentdc489bfd4b4c659b7ebb166ab540b4e767e51aaa (diff)
downloadpublic-inbox-04657044bb3695d70298624eb25394fb864fb718.tar.gz
t/v2mirror.t and t/lei-mirror.t are now skipped when curl
is missing (instead of failing in appropriate places).
A bunch of which() checks are updated to use require_cmd
to avoid explicitly loading Spawn.
Diffstat (limited to 't/lei.t')
-rw-r--r--t/lei.t4
1 files changed, 1 insertions, 3 deletions
diff --git a/t/lei.t b/t/lei.t
index d1f1cbc0..c8f47576 100644
--- a/t/lei.t
+++ b/t/lei.t
@@ -3,11 +3,9 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict; use v5.10.1; use PublicInbox::TestCommon;
 use File::Path qw(rmtree);
-use PublicInbox::Spawn qw(which);
 
 # this only tests the basic help/config/init/completion bits of lei;
 # actual functionality is tested in other t/lei-*.t tests
-my $curl = which('curl');
 my $home;
 my $home_trash = [];
 my $cleanup = sub { rmtree([@$home_trash, @_]) };
@@ -156,7 +154,7 @@ my $test_fail = sub {
         lei_ok('sucks', \'yes, but hopefully less every day');
         like($lei_out, qr/loaded features/, 'loaded features shown');
 SKIP: {
-        skip 'no curl', 3 unless which('curl');
+        skip 'no curl', 3 unless require_cmd('curl', 1);
         lei(qw(q --only http://127.0.0.1:99999/bogus/ t:m));
         is($? >> 8, 3, 'got curl exit for bogus URL');
         lei(qw(q --only http://127.0.0.1:99999/bogus/ t:m -o), "$home/junk");