aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2020-01-20 22:43:22 +0100
committerHugo Hörnquist <hugo@hornquist.se>2020-01-20 22:43:22 +0100
commitef554a7319904dda4b8985204f3878276e44bd04 (patch)
tree510d8ec3e25f7c7061c0737137a086c5e97c5136 /tests
parentAdd defaults to (date), rename attr zone to tz. (diff)
downloadcalp-ef554a7319904dda4b8985204f3878276e44bd04.tar.gz
calp-ef554a7319904dda4b8985204f3878276e44bd04.tar.xz
Fix termios tests.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/termios.scm11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/termios.scm b/tests/termios.scm
index 22d8e242..f07d20a0 100755
--- a/tests/termios.scm
+++ b/tests/termios.scm
@@ -16,21 +16,24 @@
((srfi srfi-60)
(bitwise-ior . ||)
(bitwise-not . ~)
- (bitwise-and . &)))
+ (bitwise-and . &))
+ ((guile) open-input-file))
+
+(define tty (open-input-file "/dev/tty"))
(define-syntax-rule (&= lvalue val)
(mod! lvalue (lambda (v) (& v val))))
(define t (make-termios))
-(test-equal 0 (tcgetattr! t))
+(test-equal 0 (tcgetattr! t tty))
(define ifl (lflag t))
(define copy (copy-termios t))
#!curly-infix { (lflag t) &= (~ (|| ECHO ICANON)) }
-(test-equal 0 (tcsetattr! t))
+(test-equal 0 (tcsetattr! t tty))
(test-equal (& ifl (~ (|| ECHO ICANON)))
(lflag t))
-(test-equal 0 (tcsetattr! copy))
+(test-equal 0 (tcsetattr! copy tty))