File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232(defn- print-char [c]
3333 (-write *out* (condp = c
3434 \backspace " \\ backspace"
35+ \space " \\ space"
3536 \tab " \\ tab"
3637 \newline " \\ newline"
3738 \formfeed " \\ formfeed"
Original file line number Diff line number Diff line change 1111 (:require-macros
1212 [cljs.pprint-test :refer [simple-tests code-block]])
1313 (:require
14- [cljs.test :as t :refer-macros [deftest is]]
14+ [cljs.test :as t :refer-macros [deftest is are ]]
1515 [cljs.pprint :refer [pprint cl-format get-pretty-writer prn print-table
1616 *print-pprint-dispatch* simple-dispatch
1717 *print-right-margin* *print-miser-width*
@@ -1087,3 +1087,14 @@ Usage: *hello*
10871087"
10881088 )
10891089
1090+ (deftest test-cljs-2881
1091+ (are [expected ch]
1092+ (= expected (with-out-str (cl-format true " ~@c" ch)))
1093+ " \\ newline" \newline
1094+ " \\ space" \space
1095+ " \\ tab" \tab
1096+ " \\ backspace" \backspace
1097+ " \\ return" \return
1098+ " \\ formfeed" \formfeed
1099+ " \\\" " \"
1100+ " \\\\ " \\))
You can’t perform that action at this time.
0 commit comments