diff options
author | Stuart Halloway <stu@thinkrelevance.com> | 2010-06-03 11:29:42 -0400 |
---|---|---|
committer | Stuart Halloway <stu@thinkrelevance.com> | 2010-06-03 21:20:02 -0400 |
commit | 31c184a0738b36a0610b6d3034a256bc970643bc (patch) | |
tree | d4e81ad803430308ae7c7b8ee9c57ca7f9078c68 | |
parent | edbc2cad32350492eee0cdafc24b6ec3b3ec6105 (diff) |
test for #327
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
-rw-r--r-- | test/clojure/test_clojure/rt.clj | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/clojure/test_clojure/rt.clj b/test/clojure/test_clojure/rt.clj index dd0e90ca..5b7f2493 100644 --- a/test/clojure/test_clojure/rt.clj +++ b/test/clojure/test_clojure/rt.clj @@ -38,6 +38,20 @@ (is (re-matches ~msg-re (with-err-string-writer (eval-in-temp-ns ~form)))) (is (re-matches ~msg-re (with-err-print-writer (eval-in-temp-ns ~form)))))) +(defn bare-rt-print + "Return string RT would print prior to print-initialize" + [x] + (with-out-str + (try + (push-thread-bindings {#'clojure.core/print-initialized false}) + (clojure.lang.RT/print x *out*) + (finally + (pop-thread-bindings))))) + +(deftest rt-print-prior-to-print-initialize + (testing "pattern literals" + (is (= "#\"foo\"" (bare-rt-print #"foo"))))) + (deftest error-messages (testing "binding a core var that already refers to something" (should-print-err-message |