From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0Np/IOS9oGJCBQAAbAwnHQ (envelope-from ) for ; Wed, 08 Jun 2022 17:19:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aBSbH+S9oGI0QgEAG6o9tA (envelope-from ) for ; Wed, 08 Jun 2022 17:19:00 +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 20318A5E6 for ; Wed, 8 Jun 2022 17:19:00 +0200 (CEST) Received: from localhost ([::1]:40240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyxSU-0001ep-Ff for larch@yhetil.org; Wed, 08 Jun 2022 11:18:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyxRa-0001ab-J0 for guix-patches@gnu.org; Wed, 08 Jun 2022 11:18:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50093) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyxRa-0001qU-67 for guix-patches@gnu.org; Wed, 08 Jun 2022 11:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nyxRa-0006aJ-0J for guix-patches@gnu.org; Wed, 08 Jun 2022 11:18:02 -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: Taiju HIGASHI Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Jun 2022 15:18: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: Maxime Devos Cc: 55845@debbugs.gnu.org Received: via spool by 55845-submit@debbugs.gnu.org id=B55845.165470145125275 (code B ref 55845); Wed, 08 Jun 2022 15:18:01 +0000 Received: (at 55845) by debbugs.gnu.org; 8 Jun 2022 15:17:31 +0000 Received: from localhost ([127.0.0.1]:43990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyxR4-0006Za-SF for submit@debbugs.gnu.org; Wed, 08 Jun 2022 11:17:31 -0400 Received: from mail-pg1-f170.google.com ([209.85.215.170]:41529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyxR2-0006ZL-RX for 55845@debbugs.gnu.org; Wed, 08 Jun 2022 11:17:30 -0400 Received: by mail-pg1-f170.google.com with SMTP id e66so19155156pgc.8 for <55845@debbugs.gnu.org>; Wed, 08 Jun 2022 08:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=taiju-info.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=cLv4XN5pX5ZlU6Rne9OoMwBwqmiVph1TWVUrgpwISic=; b=f7kXyeHz0xGcU43zbiBPTz/hDjuO+jb2KYpS9nyR0O8tl9364TuacWoW0pfXtUA5cQ keL3Y70Se1fsjHLb66mJeDKdWnbb78xj7/EWHEbcdUr8WUMaEGvVsWloD1lMmYVA064S LWoxEPEE8gYNzyIezRaeMY4Bi06N7YPhJuiyF+Fk+C3Z2ugLNn9vXkX6YN6U2nmcRdH8 UqGSDvEBOoyHbXsQS1P9KjG30zlHZVn/NZRVPfNFwygI1EGX7r6y+U/OKNdM9cqfU+LJ s+ASJN9Kb6iOmti0/ntcoyByOciRVcli94JkQMnkBE8jZMcL7xO+BE9G3/GSQy9q0ZH9 42vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=cLv4XN5pX5ZlU6Rne9OoMwBwqmiVph1TWVUrgpwISic=; b=qUIUNx7ySNTQhJbmAv7I7Ddi2eAN6U0iDXqr1AYPTI/WwD3xX9HbbIL0MdGrS2LxIZ Eq4+UVDeVVmFQo+lkAhWvaP6kYGoC8JW8FU/u2QPY3bV9ONbIs/EAErAZkoM90thjFdm KWCBup1hj5X3cTXbm3n3MChdfahC4wmK3EBeVNDTiAqacvVgob3NMKxFTrJVI5fTD7xF lg9UJZJr8nszx15iQ9LyrzA/9NKwk/ptAOBzgRuv9tMM2i2uh7iET2vtxY2nU3o5G/Cw /8Cgrht0CveKo1r6q5WrUJhHAIj0tPxeMPkl4L3Ciw1P1ucYGdRHZIucgQ7fQSM/Msin pi3w== X-Gm-Message-State: AOAM531VsW4HbGr71ytEwQkusITCiNygbdzeJKmH1lJ+nACVoXJPVyTa CltiQrJpTV6gdAp2FuiHSxucUvtL8B+d9dYS X-Google-Smtp-Source: ABdhPJwlsGhnMs0Si7tGO58HIW5yi3BXVQLUAAeiSD5aLaZSf0DJ+kC3bDdkIb6drRBrcjPI0duswg== X-Received: by 2002:a05:6a00:198e:b0:51c:3511:4aff with SMTP id d14-20020a056a00198e00b0051c35114affmr10149659pfl.20.1654701442627; Wed, 08 Jun 2022 08:17:22 -0700 (PDT) Received: from Taix ([240b:253:ec40:2400:b7d1:436e:2d61:e925]) by smtp.gmail.com with ESMTPSA id i3-20020a056a00004300b0050dc76281c9sm15198983pfk.163.2022.06.08.08.17.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 08:17:22 -0700 (PDT) From: Taiju HIGASHI References: <20220608102124.14865-1-higashi@taiju.info> <20220608102257.15042-1-higashi@taiju.info> <87leu72sbo.fsf@taiju.info> <55fe6cdbed891707aca419ff4eedd7c37ef3eb03.camel@telenet.be> Date: Thu, 09 Jun 2022 00:17:19 +0900 In-Reply-To: <55fe6cdbed891707aca419ff4eedd7c37ef3eb03.camel@telenet.be> (Maxime Devos's message of "Wed, 08 Jun 2022 17:08:13 +0200") Message-ID: <87k09r18xs.fsf@taiju.info> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp 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=1654701540; 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=cLv4XN5pX5ZlU6Rne9OoMwBwqmiVph1TWVUrgpwISic=; b=tsx6kEs39FYqAwgLMB9VTw4eq0gflzdyc4eBtWO4IXq9E6sR5TGkCCtjLoxZxCTVqPn3Og z+dsuxqMW+KfpvO7J/8a5bD9P3tEiG9I8FZJZMWjDQ5YUpLLOUgOGeCeduA1TeyaaQoApW vEGgWVeHmlW/uZDIC+RJzOPwLhklQhlGe8pF5hd9Q2xZV+3uSPb2y8RbOJtFUmANgiGe9C H6kWb1UiAuuYp7MoOA/EecjMfDsLrLlOBJEMTVjCbLkJxSnec0pHJhoHbkYMODmBIQFzBG V7nrooVd0EqkNvn30V8jJseKlZEUZUrB77tTTAnLFEfnDydex94ZTG4NrxB82w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654701540; a=rsa-sha256; cv=none; b=NNm37oDLDcRg54Z+jZ3FcBbulgEsFl60EdMGHaRHkGM9YbWk5Be1J2IDuSFIbhvh10bnDf pCYkvFwia5X9MWNS02uDDqyQwGQ0MMg4IFeTk0FiG2dD9NX+lITSGDMpVYNLf7YuMBOVUp 6iVfWthUWciVVH09frofSFvflI4EfIH0cXA4Dlc6ZMIBMPpiDHXn+kHCZV8bqSuFkqSXTv B8vERSqBZrHJepV+yFIq6EHu9g5J3qK9f9d1ndjQEDrwwXt+eVRXY1R1W27RPRsCL+dJYd yeVfdwBHg6wIu89gy4nl5WVtEUy7otOXSuMsg/A4fbmwvibnnW/ETSJ1G2xICQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=f7kXyeHz; dmarc=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: -0.10 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=f7kXyeHz; dmarc=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: 20318A5E6 X-Spam-Score: -0.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: 5JBlctXh6O3U Maxime Devos writes: > [Please keep debbugs in CC] I'm sorry. > Taiju HIGASHI schreef op wo 08-06-2022 om 22:33 [+0900]: >> > Ideally there would be some regression tests as well. >> >> 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 > ‘correct’ 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'. Thanks for the implementation tips. I will try to implement the test as well, although it will be after tomorrow. Is tests/ui.scm the right place to implement the tests? Thanks, -- Taiju