[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 02/03: posix.test should handle missing ttyname command
From: |
Mike Gran |
Subject: |
[Guile-commits] 02/03: posix.test should handle missing ttyname command |
Date: |
Thu, 19 Apr 2018 16:25:47 -0400 (EDT) |
mike121 pushed a commit to branch wip-mingw-guile-2.2
in repository guile.
commit 57355ee431b85d861d5ae26d96fdd2d5299b886c
Author: Michael Gran <address@hidden>
Date: Thu Apr 19 13:23:12 2018 -0700
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 d8975f0..64b8d96 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