Skip to content

Commit

Permalink
Add test for :print-fallback and :escape-types.
Browse files Browse the repository at this point in the history
  • Loading branch information
greglook committed Mar 7, 2015
1 parent 496c9f6 commit a154ccb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/puget/printer_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@
(testing "Unknown values"
(let [usd (java.util.Currency/getInstance "USD")]
(should-fail-when-strict usd)
(is (re-seq #"#<java.util.Currency@[0-9a-f]+ USD>" (pprint-str usd))))))
(is (re-seq #"#<java\.util\.Currency@[0-9a-f]+ USD>" (pprint-str usd)))
(with-options {:print-fallback :print
:escape-types #{'puget.printer_test.TestRecord}}
(is (= "#<Currency USD>" (pprint-str usd)))))))


(deftest metadata-printing
Expand Down

0 comments on commit a154ccb

Please sign in to comment.