Skip to content

Commit 2731878

Browse files
committed
Add clojure.tools.reader vars
For compatibility with new tests in clj-commons/rewrite-clj#306, add `clojure.tools-reader`: - `read-string` - `*read-eval*`
1 parent 5adc46b commit 2731878

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/sci_test/impl/extras.clj

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@
44
[clojure.java.io :as io]
55
[clojure.tools.reader :as tr]
66
[clojure.tools.namespace.find :as ns-find]
7-
[clojure.tools.reader.edn :as edn]))
7+
[clojure.tools.reader.edn :as edn]
8+
[sci.core :as sci]))
9+
10+
(def reader-ns (sci/create-ns 'clojure.tools.reader nil))
11+
(def read-eval (sci/new-dynamic-var '*read-eval* true {:ns reader-ns}))
812

913
(def namespaces
1014
{'clojure.java.io {'file io/file}
1115
'clojure.tools.namespace.find {'find-namespaces ns-find/find-namespaces
1216
'clj ns-find/clj}
13-
'clojure.tools.reader {'*alias-map* tr/*alias-map*}
17+
'clojure.tools.reader {'*alias-map* tr/*alias-map*
18+
'*read-eval* read-eval
19+
'read-string tr/read-string}
1420
'clojure.tools.reader.edn {'read-string edn/read-string}})

0 commit comments

Comments
 (0)