From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0EJ0Lca7oGJ+VgAAbAwnHQ (envelope-from ) for ; Wed, 08 Jun 2022 17:09:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uD+QLMa7oGJ5rgAAG6o9tA (envelope-from ) for ; Wed, 08 Jun 2022 17:09:58 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 561D0384F5 for ; Wed, 8 Jun 2022 17:09:58 +0200 (CEST) Received: from localhost ([::1]:55700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyxJl-0000nC-86 for larch@yhetil.org; Wed, 08 Jun 2022 11:09:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyxIs-0000lR-Fh for guix-patches@gnu.org; Wed, 08 Jun 2022 11:09:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50080) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyxIr-0008VS-W8 for guix-patches@gnu.org; Wed, 08 Jun 2022 11:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nyxIr-0006Mu-Lu for guix-patches@gnu.org; Wed, 08 Jun 2022 11:09:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Jun 2022 15:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55845 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Taiju HIGASHI Cc: 55845@debbugs.gnu.org Received: via spool by 55845-submit@debbugs.gnu.org id=B55845.165470090124432 (code B ref 55845); Wed, 08 Jun 2022 15:09:01 +0000 Received: (at 55845) by debbugs.gnu.org; 8 Jun 2022 15:08:21 +0000 Received: from localhost ([127.0.0.1]:43977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyxID-0006Lz-9Z for submit@debbugs.gnu.org; Wed, 08 Jun 2022 11:08:21 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:44092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyxIB-0006Lq-3y for 55845@debbugs.gnu.org; Wed, 08 Jun 2022 11:08:20 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id gf8H2700C4UW6Th01f8HDf; Wed, 08 Jun 2022 17:08:17 +0200 Message-ID: <55fe6cdbed891707aca419ff4eedd7c37ef3eb03.camel@telenet.be> From: Maxime Devos Date: Wed, 08 Jun 2022 17:08:13 +0200 In-Reply-To: <87leu72sbo.fsf@taiju.info> References: <20220608102124.14865-1-higashi@taiju.info> <20220608102257.15042-1-higashi@taiju.info> <87leu72sbo.fsf@taiju.info> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-IZTYJcXk3fXp9W/qJwmy" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1654700897; bh=eYoQr/EE7OYYG1+ib1w65DOoqAJMs36jCppnxTdBxd0=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=J7xiyb0XyPKRgm/6ur8vvG4Bj6q4JR8IwXkMRBlU/kKAUeg76jmN2+A0NDdC8ncfa sTDznGvdi9yzxPpfnD3S36rL7H1Za5uuGbvXE4ywm2+lN5/Ldx9eNKnHsDaScbn+R9 v/4UK51YTWN4D7jU127lOIRj88HM3bEl3WdIT/S2XrHgMwWgRYRYUvc4GvGgQF3eoh VShf12dS2wGvXvMfzWoKSZdy++tTnNdQg27JKFeLvTIOqXg4+8Dn3Dn5soTXuF/WnK jaAcF9Lgk3W//va7HJiX/Pf+U+BWfWfZ9+2uU9Xgr5A+itQ4U4/+hbg+69VHCIGBsh ANhlZQ0wJ7Awg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654700998; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=eYoQr/EE7OYYG1+ib1w65DOoqAJMs36jCppnxTdBxd0=; b=cuQl6XD6gMEC2S9Xu7R0Dxx5IP926W7Du0maPe10mgxg0KfgT+xzEHa++g0A+zaioyUNc1 FI4epWoYa6nY3aaI2EhS+yZrwk92F4Jl+s1oitequnJNNCssIEYnqSeqTk1uxqP9YjsL1b 40lsHcb3pRY8X+qHmxfKn/ySvn65CmU0DsQtufbBWCjo6StwF4/jqYeEJsfw0kP/+GoBDb ksaJua+fZDduFCLBAXH0KWV3vBH391Fu1fnekf/U5fmUZAxeTf1nJ8itALfX511idDIIfb r2XitXXq8C0j5MDsAe9YDUAkeeI521JzZy5rzFPzmKyouxWgVLZe2Yzs5Fwkqg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654700998; a=rsa-sha256; cv=none; b=fVsTrrS0b03TJhNFr4BdxZApPmkbGyTPt4dRm2DlNilb1IM6+KLTlS9ND/hQ+ZPSwC/3u3 mKEn8Z0E9oWRnuHfKOFe78z7LfqTGVxyC+Da8Rr+WjKkHoOk33msBdRZe5WBqCjPPrKGWi RS0RbowfOIKywPn95y50VxhgeDZEaN81cz/YzkKNwv0MCkgU0Nir1ZHNny3PLMTZoNjlZX y7loB2wtgNJ863kJFX/WjAqE9f1n+Z34SXSK968N+JB0Lx4O7bPwz65jb21lbC81F9cPt6 NKy0kPKapgnEVbnpaK1pK6arJUpv+Q7pN3+FZlCD/bwm8qGXJ2PlXxZwY+o5VQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=J7xiyb0X; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 3.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=J7xiyb0X; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 561D0384F5 X-Spam-Score: 3.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: ZHgMegLvzW++ --=-IZTYJcXk3fXp9W/qJwmy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable [Please keep debbugs in CC] Taiju HIGASHI schreef op wo 08-06-2022 om 22:33 [+0900]: > > Ideally there would be some regression tests as well. >=20 > I think I can write tests if I can figure out how to give a minimal > specific package to the test preconditions, do you have any test > codes > that are similar and can be used as a reference? Not really, but FWIW it might be convenient to use the with-environment-variables macro and mock the call to open-pipe* with the 'mock' macro to make sure that open-pipe* is called with the =E2=80=98correct=E2=80=99 pager according to PATH (*). Searching for 'mock= ' with "git grep -F" should find some examples. (*) call-with-temporary-directory + chmod + call-with-output-file may be useful for setting up a simulated $PATH with a dummy 'less' and/or 'more'. Greetings, Maxime. --=-IZTYJcXk3fXp9W/qJwmy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqC7XRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7h8jAP9B1zTmcC+e4dCLljBI+fLq8TVq CsP2jacOxeIJD+rUYQD/Y8m5xt/oqWeJ8w60ZqdK/EnAgc6Cbi6mBQIf7Tq9XAw= =eb9M -----END PGP SIGNATURE----- --=-IZTYJcXk3fXp9W/qJwmy--