Fix printing records in clojurescript
This commit is contained in:
parent
49bdadd816
commit
a36032da5a
2 changed files with 7 additions and 11 deletions
|
@ -7,7 +7,8 @@
|
||||||
(defn- print-seq [aseq]
|
(defn- print-seq [aseq]
|
||||||
(pp/pprint-logical-block
|
(pp/pprint-logical-block
|
||||||
(pp/write-out (ffirst aseq))
|
(pp/write-out (ffirst aseq))
|
||||||
(print " ")
|
#?(:clj (print " ")
|
||||||
|
:cljs (-write *out* " "))
|
||||||
(pp/pprint-newline :linear)
|
(pp/pprint-newline :linear)
|
||||||
;; [pjs] this is kind of ugly, but it is a private var :(
|
;; [pjs] this is kind of ugly, but it is a private var :(
|
||||||
;; always print both parts of the [k v] pair
|
;; always print both parts of the [k v] pair
|
||||||
|
|
15
test/fixtures/test_output_cljs
vendored
15
test/fixtures/test_output_cljs
vendored
|
@ -128,12 +128,10 @@ Testing pjstadig.humane-test-output.records-test
|
||||||
FAIL in (t-records) (:)
|
FAIL in (t-records) (:)
|
||||||
THESE TESTS ARE INTENDED TO FAIL these should not print as plain maps
|
THESE TESTS ARE INTENDED TO FAIL these should not print as plain maps
|
||||||
expected:
|
expected:
|
||||||
|
#pjstadig.humane-test-output.records-test.ARecord{:foo :foo}
|
||||||
#pjstadig.humane-test-output.records-test.ARecord{:foo:foo}
|
|
||||||
|
|
||||||
actual:
|
actual:
|
||||||
|
#pjstadig.humane-test-output.records-test.ARecord{:foo :bar}
|
||||||
#pjstadig.humane-test-output.records-test.ARecord{:foo:bar}
|
|
||||||
|
|
||||||
diff:
|
diff:
|
||||||
-
|
-
|
||||||
|
@ -146,8 +144,7 @@ expected:
|
||||||
FAIL in (t-records) (:)
|
FAIL in (t-records) (:)
|
||||||
THESE TESTS ARE INTENDED TO FAIL there should be a diff here
|
THESE TESTS ARE INTENDED TO FAIL there should be a diff here
|
||||||
expected:
|
expected:
|
||||||
|
#pjstadig.humane-test-output.records-test.ARecord{:foo :foo}
|
||||||
#pjstadig.humane-test-output.records-test.ARecord{:foo:foo}
|
|
||||||
|
|
||||||
actual:
|
actual:
|
||||||
{:foo :foo}
|
{:foo :foo}
|
||||||
|
@ -158,12 +155,10 @@ expected:
|
||||||
FAIL in (t-records) (:)
|
FAIL in (t-records) (:)
|
||||||
THESE TESTS ARE INTENDED TO FAIL and here
|
THESE TESTS ARE INTENDED TO FAIL and here
|
||||||
expected:
|
expected:
|
||||||
|
#pjstadig.humane-test-output.records-test.ARecord{:foo :foo}
|
||||||
#pjstadig.humane-test-output.records-test.ARecord{:foo:foo}
|
|
||||||
|
|
||||||
actual:
|
actual:
|
||||||
|
#pjstadig.humane-test-output.records-test.BRecord{:foo :foo}
|
||||||
#pjstadig.humane-test-output.records-test.BRecord{:foo:foo}
|
|
||||||
|
|
||||||
diff:
|
diff:
|
||||||
+
|
+
|
||||||
|
|
Loading…
Reference in a new issue