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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user