From: Taiju HIGASHI <higashi@taiju.info>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 55845@debbugs.gnu.org, me@tobias.gr
Subject: [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed.
Date: Thu, 09 Jun 2022 19:23:20 +0900 [thread overview]
Message-ID: <874k0uxhif.fsf@taiju.info> (raw)
In-Reply-To: <87fskexiyc.fsf@taiju.info> (Taiju HIGASHI's message of "Thu, 09 Jun 2022 18:52:11 +0900")
Hi Maxime,
I tried to mock open-pipe* and isatty?* using the mock macro and also
add a test to inspect the program coming across to open-pipe*, but gave
up because I could not get the return value of the
with-paginated-output-port macro.
I think we are one step closer, but it is not working.
I will share a piece of code in the process of verification just in
case.
(test-equal "with-paginated-output-port"
"less"
(call-with-temporary-directory
(lambda (dir)
(with-environment-variables
`(("PATH" ,dir))
(make-dummy-executable-file dir "less")
(mock ((ice-9 popen) open-pipe*
(lambda (mode command . args)
(current-output-port)))
(mock ((guix colors) isatty?* (const #t))
(with-paginated-output-port paginated
"less")))))))
I have debugged that the return value of dynamic-wind is "less", but I
could not successfully use it for assertions.
I also tried to inspect the value of the command argument using
test-equal in the open-pipe* mock replacement function, but it did not
work.
Is there a better way to do this?
Thanks,
--
Taiju
next prev parent reply other threads:[~2022-06-09 12:50 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 10:21 [bug#55845] [PATCH 0/1] Improve pager selection logic when less is not installed Taiju HIGASHI
2022-06-08 10:22 ` [bug#55845] [PATCH 1/1] ui: " Taiju HIGASHI
2022-06-08 13:18 ` Maxime Devos
[not found] ` <87leu72sbo.fsf@taiju.info>
2022-06-08 15:08 ` Maxime Devos
2022-06-08 15:17 ` Taiju HIGASHI
2022-06-08 16:46 ` Maxime Devos
2022-06-09 9:52 ` Taiju HIGASHI
2022-06-09 10:23 ` Taiju HIGASHI [this message]
2022-06-09 19:43 ` Maxime Devos
2022-06-10 0:39 ` Taiju HIGASHI
2022-06-10 7:47 ` Maxime Devos
2022-06-10 8:40 ` Taiju HIGASHI
2022-06-10 15:08 ` Maxime Devos
2022-06-11 11:26 ` Taiju HIGASHI
2022-06-14 23:58 ` Taiju HIGASHI
2022-06-15 8:02 ` Maxime Devos
2022-06-16 21:43 ` [bug#55845] [PATCH 0/1] " Ludovic Courtès
2022-06-17 0:38 ` Taiju HIGASHI
2022-06-17 12:39 ` Ludovic Courtès
2022-06-17 13:36 ` Taiju HIGASHI
2022-06-17 15:12 ` Ludovic Courtès
2022-06-18 14:11 ` Taiju HIGASHI
2022-06-10 0:55 ` [bug#55845] [PATCH 1/1] ui: " Taiju HIGASHI
2022-06-10 7:37 ` Maxime Devos
2022-06-10 8:52 ` Taiju HIGASHI
2022-06-08 12:14 ` [bug#55845] [PATCH 0/1] " Tobias Geerinckx-Rice via Guix-patches via
2022-06-08 13:12 ` Taiju HIGASHI
2022-06-08 14:22 ` Tobias Geerinckx-Rice via Guix-patches via
2022-06-08 15:09 ` Taiju HIGASHI
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=874k0uxhif.fsf@taiju.info \
--to=higashi@taiju.info \
--cc=55845@debbugs.gnu.org \
--cc=maximedevos@telenet.be \
--cc=me@tobias.gr \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.