test: cover the janet interop bridge and nREPL var rendering
- host-interop-spec: add an 'interop / janet bridge' suite — janet/<name> and janet.<module>/<name> resolution, the value-representation boundary (a Jolt vector crosses as a Janet table), explicit-only (unprefixed module not exposed), and unknown-symbol errors. - nrepl-test: assert a def's value renders as #'ns/name (pr-str loops on a var's cyclic ns refs, so jolt.nrepl renders vars itself).
This commit is contained in:
parent
dd96b1900a
commit
5b66cfaa97
2 changed files with 20 additions and 1 deletions
|
|
@ -49,8 +49,11 @@
|
|||
# eval returns a value
|
||||
(check "eval (+ 1 2)" "(some #(get % \"value\") (jolt.nrepl/client-eval c \"(+ 1 2)\" s))" "3")
|
||||
|
||||
# a def's value renders as #'ns/name (pr-str loops on a var's cyclic ns refs)
|
||||
(check "def renders as #'ns/name"
|
||||
"(some #(get % \"value\") (jolt.nrepl/client-eval c \"(def yy 21)\" s))" "#'user/yy")
|
||||
|
||||
# defs persist across evals in the session
|
||||
(ev "(jolt.nrepl/client-eval c \"(def yy 21)\" s)")
|
||||
(check "def then use" "(some #(get % \"value\") (jolt.nrepl/client-eval c \"(* yy 2)\" s))" "42")
|
||||
|
||||
# stdout is captured and streamed as an out message
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue