Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

test for #327

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
  • Loading branch information...
commit 31c184a0738b36a0610b6d3034a256bc970643bc 1 parent edbc2ca
@stuarthalloway stuarthalloway authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/clojure/test_clojure/rt.clj
View
14 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
Please sign in to comment.
Something went wrong with that request. Please try again.