summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/clojure/test_clojure/rt.clj14
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