diff --git a/scsh/test/terminal-device-control-test.scm b/scsh/test/terminal-device-control-test.scm index 139e71f..80cefdd 100644 --- a/scsh/test/terminal-device-control-test.scm +++ b/scsh/test/terminal-device-control-test.scm @@ -116,37 +116,10 @@ ttyin/input-flow-ctl ttyin/output-flow-ctl))) -(add-test! 'tty-info-record-svr4&4.3+bsd-input-flags 'terminal-device-control - (lambda () - (or (and ttyin/xon-any - ttyin/beep-on-overflow - ttyin/lowercase)))) - (add-test! 'tty-info-record-posix-output-flags 'terminal-device-control (lambda () ttyout/enable)) -(add-test! 'tty-info-record-svr4&4.3+bsd-output-flags 'terminal-device-control - (lambda () - (or (and ttyout/nl->crnl - ttyout/discard-eot - ttyout/expand-tabs - ttyout/cr->nl - ttyout/nl-does-cr - ttyout/no-col0-cr - ttyout/delay-w/fill-char - ttyout/fill-w/del - ttyout/uppercase) - (not (and ttyout/nl->crnl - ttyout/discard-eot - ttyout/expand-tabs - ttyout/cr->nl - ttyout/nl-does-cr - ttyout/no-col0-cr - ttyout/delay-w/fill-char - ttyout/fill-w/del - ttyout/uppercase))))) - (add-test! 'tty-info-record-delay-constants-for-output-flags 'terminal-device-control (lambda () (or (and ttyout/bs-delay @@ -263,6 +236,8 @@ (close-output-port pty-out) ;; necessary on some systems for proper exit res)))))) + +;; fails on Solaris because local echo is not turned off (add-test! 'fork-pty-session 'terminal-device-control (lambda () (receive (process pty-in pty-out tty-name) @@ -270,12 +245,13 @@ (let ((inp (read))) (write (string-append inp inp))) (newline))) - (let ((ti (copy-tty-info (tty-info pty-in)))) + (let ((ti (copy-tty-info (tty-info pty-out)))) (set-tty-info:local-flags ti (bitwise-xor ttyl/echo (tty-info:local-flags ti))) - (set-tty-info/now pty-in ti)) + (set-tty-info/now pty-out ti)) (write "hello" pty-out) (newline pty-out) (let ((reply (read pty-in))) (close-output-port pty-out) ;; necessary on some systems for proper exit - (string=? "hellohello" reply))))) \ No newline at end of file + (string=? "hellohello" reply))))) +