1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-01 23:30:28 +02:00

posix.test should handle missing ttyname command

* test-suite/tests/posix.test ("ttyname"): handle undefined case
This commit is contained in:
Michael Gran 2018-04-19 13:23:12 -07:00
parent b2a50874bb
commit 57355ee431

View file

@ -171,11 +171,13 @@
(pass-if-exception "non-tty argument" exception:system-error
;; This used to crash in 1.8.1 and earlier.
(let ((file (false-if-exception
(open-output-file "/dev/null"))))
(if (not file)
(throw 'unsupported)
(ttyname file)))))
(if (not (defined? 'ttyname))
(throw 'unsupported)
(let ((file (false-if-exception
(open-output-file "/dev/null"))))
(if (not file)
(throw 'unsupported)
(ttyname file))))))
;;
;; utimes