[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is n
From: |
Taiju HIGASHI |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
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
- [bug#55845] [PATCH 0/1] Improve pager selection logic when less is not installed, Taiju HIGASHI, 2022/06/08
- [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed., Taiju HIGASHI, 2022/06/08
- [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed., Maxime Devos, 2022/06/08
- [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed., Taiju HIGASHI, 2022/06/09
- [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed.,
Taiju HIGASHI <=
- [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed., Maxime Devos, 2022/06/09
- [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed., Taiju HIGASHI, 2022/06/09
- [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed., Maxime Devos, 2022/06/10
- [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed., Taiju HIGASHI, 2022/06/10
- [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed., Maxime Devos, 2022/06/10
- [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed., Taiju HIGASHI, 2022/06/11
- [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed., Taiju HIGASHI, 2022/06/14
- [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed., Maxime Devos, 2022/06/15
- [bug#55845] [PATCH 0/1] Improve pager selection logic when less is not installed, Ludovic Courtès, 2022/06/16
- [bug#55845] [PATCH 0/1] Improve pager selection logic when less is not installed, Taiju HIGASHI, 2022/06/16