summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2016-02-22 20:45:14 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2016-02-22 20:45:14 +0300
commit731f2da7f307161bdf4cc97ca847a7620890851d (patch)
tree07d9a30554ad5e3a65557887289576dc271f3e67 /tests
parentpopen.scm: Add 'OPEN_PTY' mode (diff)
downloadguile-ssh-731f2da7f307161bdf4cc97ca847a7620890851d.tar.gz
tests/popen.scm ("open-remote-pipe, OPEN_PTY_READ"): New TC
* tests/popen.scm ("open-remote-pipe, OPEN_PTY_READ"): New test case. ("open-remote-pipe"): Rename to "open-remote-pipe, OPEN_READ".
Diffstat (limited to 'tests')
-rw-r--r--tests/popen.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/popen.scm b/tests/popen.scm
index 7bffad9..32d6fa8 100644
--- a/tests/popen.scm
+++ b/tests/popen.scm
@@ -47,7 +47,7 @@
;;;
-(test-assert-with-log "open-remote-pipe"
+(test-assert-with-log "open-remote-pipe, OPEN_READ"
(run-client-test
start-server/exec
(lambda ()
@@ -59,6 +59,19 @@
(lambda args
(string=? (read-line channel) "pong"))))))))
+(test-assert-with-log "open-remote-pipe, OPEN_PTY_READ"
+ (run-client-test
+ start-server/exec
+ (lambda ()
+ (let* ((session (make-session/channel-test))
+ (OPEN_PTY_READ (string-append OPEN_PTY OPEN_READ))
+ (channel (open-remote-pipe session "ping" OPEN_PTY_READ)))
+ (and (input-port? channel)
+ (not (output-port? channel))
+ (poll channel
+ (lambda args
+ (string=? (read-line channel) "pong"))))))))
+
(test-assert-with-log "open-remote-pipe*"
(run-client-test
start-server/exec