mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 13:10:33 +02:00
syscalls: Add 'terminal-rows'.
* guix/build/syscalls.scm (terminal-dimension): New procedure.
(terminal-columns): Rewrite in terms of 'terminal-dimension'.
(terminal-rows): New procedure.
* tests/syscalls.scm ("terminal-rows"): New test.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2015 David Thompson <davet@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
@@ -538,6 +538,9 @@
|
||||
(> (terminal-columns (open-input-string "Join us now, share the software!"))
|
||||
0))
|
||||
|
||||
(test-assert "terminal-rows"
|
||||
(> (terminal-rows) 0))
|
||||
|
||||
(test-assert "utmpx-entries"
|
||||
(match (utmpx-entries)
|
||||
(((? utmpx? entries) ...)
|
||||
|
||||
Reference in New Issue
Block a user