Skip to content

Commit

Permalink
#822: push-thread-bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Oct 31, 2022
1 parent 950e561 commit 7f8da5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/sci/impl/namespaces.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@
'partition-by (copy-core-var partition-by)
'persistent! (copy-core-var persistent!)
#?@(:clj ['promise (copy-core-var promise)])
'push-thread-bindings (copy-core-var sci.impl.vars/push-thread-bindings)
'push-thread-bindings (copy-var sci.impl.vars/push-thread-bindings clojure-core-ns {:name 'push-thread-bindings})
'qualified-ident? (copy-core-var qualified-ident?)
'qualified-symbol? (copy-core-var qualified-symbol?)
'qualified-keyword? (copy-core-var qualified-keyword?)
Expand Down
9 changes: 5 additions & 4 deletions test/sci/namespaces_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -311,17 +311,18 @@ bar/bar"}
#?(:clj get-thread-bindings)
satisfies?
ns-unmap]]
(is (true? (eval* (str/replace "(string? (:doc (meta #'{{v}})))" "{{v}}" (str v)))))))
(is (true? (eval* (str/replace "(string? (:doc (meta #'{{v}})))" "{{v}}" (str v)))) v)))
(testing "dynvars"
(doseq [v '[*print-namespace-maps*
*print-dup*
*print-readably*]]
(is (true? (eval* (str/replace "(string? (:doc (meta #'{{v}})))" "{{v}}" (str v)))))))
(is (true? (eval* (str/replace "(string? (:doc (meta #'{{v}})))" "{{v}}" (str v)))) v)))
(testing "regular vars"
(doseq [v '[inc
newline
pr]]
(is (true? (eval* (str/replace "(string? (:doc (meta #'{{v}})))" "{{v}}" (str v))))))))
pr
#?(:clj push-thread-bindings)]]
(is (true? (eval* (str/replace "(string? (:doc (meta #'{{v}})))" "{{v}}" (str v)))) v))))

#?(:cljs
(deftest test-munge-demunge
Expand Down

0 comments on commit 7f8da5d

Please sign in to comment.