[#611] pprint/print-table should write to sci/out

This commit is contained in:
Michiel Borkent 2020-10-11 17:02:50 +02:00
parent e7d3a95d53
commit b5f65e10a6
2 changed files with 4 additions and 2 deletions

View file

@ -72,7 +72,7 @@
(def pprint-namespace
{'pprint (copy-var pprint pprint-ns)
'print-table (copy-var pprint/print-table pprint-ns)
'print-table (copy-var print-table pprint-ns)
'*print-right-margin* print-right-margin
'cl-format (copy-var pprint/cl-format pprint-ns)
})

View file

@ -437,7 +437,9 @@
(is (= "(0 1 2 3 4 5 6 7 8 9)\n" (bb nil "
(let [sw (java.io.StringWriter.)]
(binding [clojure.pprint/*print-right-margin* 50]
(clojure.pprint/pprint (range 10) sw)) (str sw))")))))
(clojure.pprint/pprint (range 10) sw)) (str sw))"))))
(testing "print-table writes to sci/out"
(is (str/includes? (test-utils/bb "(with-out-str (clojure.pprint/print-table [{:a 1} {:a 2}]))") "----"))))
(deftest read-string-test
(testing "namespaced keyword via alias"