diff options
| author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2017-05-02 01:30:39 +0300 |
|---|---|---|
| committer | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2017-05-02 01:30:39 +0300 |
| commit | 967f44c6c4bbacca7c15fb185aebeaa6ce2a441b (patch) | |
| tree | 73ce9eb3cfca8f7993069974bf3ffbe862720609 /tests/dist.scm | |
| parent | TODO: Update (diff) | |
| download | guile-ssh-967f44c6c4bbacca7c15fb185aebeaa6ce2a441b.tar.gz | |
node.scm (rrepl-get-result): Handle unknown # objects properly
The procedure would always fail to read unknown objects (e.g. instances
of Guile-SSH session) properly, raising an obscure errors like
"Unknown # object: #\<". Now the procedure raises 'node-repl-error'
with full evaluation result gotten from RREPL.
Reported by Mathieu, in
<https://github.com/artyom-poptsov/guile-ssh/issues/3>
* modules/ssh/dist/node.scm (rrepl-get-result): Handle unknown # objects
properly.
* tests/dist.scm ("rrepl-get-result, unknown # object error"): New test case.
* NEWS: Update
Diffstat (limited to 'tests/dist.scm')
| -rw-r--r-- | tests/dist.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/dist.scm b/tests/dist.scm index 52206f4..786c854 100644 --- a/tests/dist.scm +++ b/tests/dist.scm @@ -146,6 +146,15 @@ Unbound variable: e" "socket:9:7: In procedure module-lookup: Unbound variable: e")) rrepl-get-result)) +(test-error-with-log/= "rrepl-get-result, unknown # object error" + 'node-repl-error "Reader error: scm_lreadr: #<unknown port>:1:3: \ +Unknown # object: (#\\<): scheme@(guile-user)> \ +$4 = #<session #<undefined>@#<undefined>:22 (disconnected) 453fff>" + (call-with-input-string + (string-append "scheme@(guile-user)> $4 = " + "#<session #<undefined>@#<undefined>:22 (disconnected) 453fff>") + rrepl-get-result)) + (test-assert "rrepl-get-result, elisp" (receive (result eval-num module-name lang) (call-with-input-string "elisp@(guile-user)> $0 = #nil" |
