diff options
| author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2017-01-02 02:27:09 +0300 |
|---|---|---|
| committer | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2017-01-02 02:27:09 +0300 |
| commit | b9d7c4fb637f73dceeab02b905080a16705f4704 (patch) | |
| tree | cee0b66ce9c04e698b7c93af574ff6f052d6dba3 | |
| parent | tests/shell.scm ("command-available?"): New TC (diff) | |
| download | guile-ssh-b9d7c4fb637f73dceeab02b905080a16705f4704.tar.gz | |
tests/shell.scm ("loadavg"): New TC
* tests/shell.scm ("loadavg"): New TC.
* tests/common.scm (start-server/exec): Handle "loadavg" request.
| -rw-r--r-- | tests/common.scm | 5 | ||||
| -rw-r--r-- | tests/shell.scm | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/common.scm b/tests/common.scm index c154088..451a374 100644 --- a/tests/common.scm +++ b/tests/common.scm @@ -278,6 +278,11 @@ disconnected when the PROC is finished." (message-reply-success msg) (channel-request-send-exit-status channel 0) (channel-send-eof channel))) + ((string=? cmd "cat /proc/loadavg") + (write-line "0.01 0.05 0.10 4/1927 242011" channel) + (message-reply-success msg) + (channel-request-send-exit-status channel 0) + (channel-send-eof channel)) (else (write-line cmd channel) (message-reply-success msg) diff --git a/tests/shell.scm b/tests/shell.scm index b0acb08..b41223a 100644 --- a/tests/shell.scm +++ b/tests/shell.scm @@ -85,6 +85,15 @@ (and (zero? exit-code) result))))))) +(test-assert-with-log "loadavg" + (run-client-test + start-server/exec + (lambda () + (call-with-connected-session/shell + (lambda (session) + (equal? (loadavg session) + '("0.01" "0.05" "0.10" "4/1927" "242011"))))))) + ;;; |
