summaryrefslogtreecommitdiff
path: root/tests/syscalls.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2023-08-26 07:59:09 +0200
committerJulien Lepiller <julien@lepiller.eu>2023-11-11 11:07:27 +0100
commitfd11d7fbf8e0fcc61ff764dcc0ab737971afc55a (patch)
tree8644012afee53d31cc109bacff8173ab1857a0e4 /tests/syscalls.scm
parent61c527227ceebdad8da2d52214b253a48323cbb9 (diff)
guix: syscalls: Add terminal-string-width.
* guix/build/syscalls.scm (terminal-width): New procedure. * tests/syscalls.scm: Add tests. Change-Id: I6c2caa9fbaffb1e8f4b8933103399be970d5a8f3
Diffstat (limited to 'tests/syscalls.scm')
-rw-r--r--tests/syscalls.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/syscalls.scm b/tests/syscalls.scm
index c9e011f4537..eb85b358c4a 100644
--- a/tests/syscalls.scm
+++ b/tests/syscalls.scm
@@ -583,6 +583,12 @@
583(test-assert "terminal-rows" 583(test-assert "terminal-rows"
584 (> (terminal-rows) 0)) 584 (> (terminal-rows) 0))
585 585
586(test-assert "terminal-string-width English"
587 (= (terminal-string-width "hello") 5))
588
589(test-assert "terminal-string-width Japanese"
590 (= (terminal-string-width "今日は") 6))
591
586(test-assert "openpty" 592(test-assert "openpty"
587 (let ((head inferior (openpty))) 593 (let ((head inferior (openpty)))
588 (and (integer? head) (integer? inferior) 594 (and (integer? head) (integer? inferior)