From 57355ee431b85d861d5ae26d96fdd2d5299b886c Mon Sep 17 00:00:00 2001 From: Michael Gran Date: Thu, 19 Apr 2018 13:23:12 -0700 Subject: [PATCH] posix.test should handle missing ttyname command * test-suite/tests/posix.test ("ttyname"): handle undefined case --- test-suite/tests/posix.test | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test-suite/tests/posix.test b/test-suite/tests/posix.test index d8975f02a..64b8d96af 100644 --- a/test-suite/tests/posix.test +++ b/test-suite/tests/posix.test @@ -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