1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 13:10:33 +02:00

guix: syscalls: Add terminal-string-width.

* guix/build/syscalls.scm (terminal-width): New procedure.
* tests/syscalls.scm: Add tests.

Change-Id: I6c2caa9fbaffb1e8f4b8933103399be970d5a8f3
This commit is contained in:
Julien Lepiller
2023-08-26 07:59:09 +02:00
parent 61c527227c
commit fd11d7fbf8
2 changed files with 21 additions and 0 deletions

View File

@@ -583,6 +583,12 @@
(test-assert "terminal-rows"
(> (terminal-rows) 0))
(test-assert "terminal-string-width English"
(= (terminal-string-width "hello") 5))
(test-assert "terminal-string-width Japanese"
(= (terminal-string-width "今日は") 6))
(test-assert "openpty"
(let ((head inferior (openpty)))
(and (integer? head) (integer? inferior)