dumping ground for random patches and texts
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: spew@80x24.org
Subject: [PATCH 2/2] t/solver_git: drop needless `use' and Plack deps
Date: Mon, 15 May 2023 23:17:18 +0000	[thread overview]
Message-ID: <20230515231718.2414428-2-e@80x24.org> (raw)
In-Reply-To: <20230515231718.2414428-1-e@80x24.org>

`lei (blob|rediff)' works without Plack installed, so don't put
a dependency on Plack or anything related to HTTP aside from
the URI module which we use everywhere.  This only enables testing
the solver component on systems without Plack (as the actual lei
functionality has always worked without Plack).
---
 t/solver_git.t | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/t/solver_git.t b/t/solver_git.t
index 9396b7a1..c210c1ee 100644
--- a/t/solver_git.t
+++ b/t/solver_git.t
@@ -1,14 +1,14 @@
 #!perl -w
 # Copyright (C)  all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-use strict;
-use v5.10.1;
+use v5.12;
 use PublicInbox::TestCommon;
 use Cwd qw(abs_path);
-require_git(2.6);
+require_git v2.6;
 use PublicInbox::ContentHash qw(git_sha);
 use PublicInbox::Spawn qw(popen_rd);
-require_mods(qw(DBD::SQLite Search::Xapian Plack::Util));
+require_mods(qw(DBD::SQLite Search::Xapian URI::Escape));
+require PublicInbox::SolverGit;
 my $rdr = { 2 => \(my $null) };
 my $git_dir = xqx([qw(git rev-parse --git-common-dir)], undef, $rdr);
 $git_dir = xqx([qw(git rev-parse --git-dir)], undef, $rdr) if $? != 0;
@@ -18,7 +18,6 @@ chomp $git_dir;
 # needed for alternates, and --absolute-git-dir is only in git 2.13+
 $git_dir = abs_path($git_dir);
 
-use_ok "PublicInbox::$_" for (qw(Inbox V2Writable Git SolverGit WWW));
 my $patch2 = eml_load 't/solve/0002-rename-with-modifications.patch';
 my $patch2_oid = git_sha(1, $patch2)->hexdigest;
 
@@ -209,10 +208,11 @@ my $hinted = $res;
 shift @$res; shift @$hinted;
 is_deeply($res, $hinted, 'hints work (or did not hurt :P');
 
-my @psgi = qw(HTTP::Request::Common Plack::Test URI::Escape Plack::Builder);
+my @psgi = qw(HTTP::Request::Common Plack::Test Plack::Builder);
 SKIP: {
 	require_mods(@psgi, 7 + scalar(@psgi));
 	use_ok($_) for @psgi;
+	require PublicInbox::WWW;
 	my $binfoo = "$ibx->{inboxdir}/binfoo.git";
 	my $l = "$ibx->{inboxdir}/inbox.lock";
 	-f $l or BAIL_OUT "BUG: $l missing: $!";

      reply	other threads:[~2023-05-15 23:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 23:17 [PATCH 1/2] t/psgi_scan_all: reduce use_ok statements Eric Wong
2023-05-15 23:17 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230515231718.2414428-2-e@80x24.org \
    --to=e@80x24.org \
    --cc=spew@80x24.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).