Unmap var before interning

This commit is contained in:
Michiel Borkent 2020-05-09 16:12:43 +02:00
parent a09d5b2dd7
commit 0b9bdee8cc
3 changed files with 8 additions and 1 deletions

View file

@ -35,6 +35,12 @@ light weight replacement for native interop (JNI, JNA, etc.).
- When developing pods, this library can be used to test them on the JVM.
## Run tests
```
$ script/test
```
## License
Copyright © 2020 Michiel Borkent

View file

@ -9,5 +9,6 @@
(doseq [[ns-sym v] namespaces]
(load-string (format "(ns %s)" ns-sym))
(doseq [[var-sym v] v]
(ns-unmap ns-sym var-sym)
(intern ns-sym var-sym v)))
(future (impl/processor pod)))))

View file

@ -16,4 +16,4 @@
[1 2 3 4 5 6 7 8 9]
"Illegal arguments / {:args (1 2 3)}"] ret))
(is (= "(\"hello\" \"print\" \"this\" \"debugging\" \"message\")\n" (str out)))
(is (= "WARNING: assoc already refers to: #'clojure.core/assoc in namespace: pod.test-pod, being replaced by: #'pod.test-pod/assoc\nWARNING: print already refers to: #'clojure.core/print in namespace: pod.test-pod, being replaced by: #'pod.test-pod/print\n(\"hello\" \"print\" \"this\" \"error\")\n" (str err)))))
(is (= "(\"hello\" \"print\" \"this\" \"error\")\n" (str err)))))