1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-02 23:50:47 +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 (pass-if-exception "non-tty argument" exception:system-error
;; This used to crash in 1.8.1 and earlier. ;; This used to crash in 1.8.1 and earlier.
(if (not (defined? 'ttyname))
(throw 'unsupported)
(let ((file (false-if-exception (let ((file (false-if-exception
(open-output-file "/dev/null")))) (open-output-file "/dev/null"))))
(if (not file) (if (not file)
(throw 'unsupported) (throw 'unsupported)
(ttyname file))))) (ttyname file))))))
;; ;;
;; utimes ;; utimes