summaryrefslogtreecommitdiff
path: root/tests/dist.scm
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2017-04-30 05:49:07 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2017-04-30 05:49:07 +0300
commita4f37fb6683c332e09e597a6eb19d26f4005a08c (patch)
treecd70b3f5aaca076adbda50fccee2aeeea6c383f2 /tests/dist.scm
parenttests/tunnel.scm ("call-with-ssh-forward"): Wait for 1s before polling (diff)
downloadguile-ssh-a4f37fb6683c332e09e597a6eb19d26f4005a08c.tar.gz
node.scm (rrepl-get-result): Handle "unbound variable" errors
The procedure would always fail to read "unbound variable" errors properly, returning wrong result with only two values (current module name and current language name). Now this bug should be fixed. Reported by Mathieu, in <https://github.com/artyom-poptsov/guile-ssh/issues/3> * modules/ssh/dist/node.scm (rrepl-get-result): Handle "unbound variable" errors. * tests/dist.scm ("rrepl-get-result, unbound variable error"): New test case. * AUTHORS, NEWS: Update.
Diffstat (limited to 'tests/dist.scm')
-rw-r--r--tests/dist.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/dist.scm b/tests/dist.scm
index 307a7bb..52206f4 100644
--- a/tests/dist.scm
+++ b/tests/dist.scm
@@ -133,6 +133,19 @@
"ERROR: no code for module (module-that-doesnt-exist)")
rrepl-get-result))
+(test-error-with-log/= "rrepl-get-result, unbound variable error"
+ 'node-repl-error "scheme@(guile-user)> ;;; socket:9:7: warning: \
+possibly unbound variable `e'\nsocket:9:7: In procedure #<procedure \
+1a44920 at socket:9:7 ()>:\nsocket:9:7: In procedure module-lookup: \
+Unbound variable: e"
+ (call-with-input-string
+ (string-append (string-append
+ "scheme@(guile-user)> ;;; socket:9:7: warning: "
+ "possibly unbound variable `e'\nsocket:9:7: "
+ "In procedure #<procedure 1a44920 at socket:9:7 ()>:\n"
+ "socket:9:7: In procedure module-lookup: Unbound variable: e"))
+ 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"