             [transit.read :as r]
             [transit.write :as w]
             [transit.generators :as gen]
-            [transit.corner-cases :as cc])
-  (:import [java.io PrintStream ByteArrayOutputStream ByteArrayInputStream
+            [transit.corner-cases :as cc]
+            [clojure.pprint :as pp])
+  (:import [java.io ByteArrayOutputStream ByteArrayInputStream
             BufferedInputStream BufferedOutputStream FileInputStream]
-           [org.apache.commons.codec.binary Hex]
-           [java.math MathContext]))
+           [org.apache.commons.codec.binary Hex]))
+
+(def ^:dynamic *style* false)
+
+(def styles {:reset "[0m"
+             :red "[31m"
+             :green "[32m"
+             :bright "[1m"})
+
+(defn with-style [style & strs]
+  (let [s (apply str (interpose " " strs))]
+    (if (and *style* (not= style :none))
+      (str \u001b (style styles) s \u001b (:reset styles))
+      s)))
 
 (def TIMEOUT
   "Timeout for roundtrip requests to native implementation"

              :desc "exemplar file"
              :input transit-exemplars
              :path [:tests :exemplar-file]
              :test #(test-transit % proc encoding)}
             {:pred (constantly true)
              :desc "EDN corner case"
              :input cc/forms
              :path [:tests :corner-case-edn]
              :test #(test-edn % proc encoding)}
             {:pred (fn [_ e _] (= e :json))
              :desc "JSON transit corner case"
              :input (map (fn [s] (.getBytes s)) cc/transit-json)
              :path [:tests :corner-case-transit-json]
              :test #(test-transit % proc encoding)}
             {:pred (fn [_ _ o] (:gen o))
              :desc "generated EDN"
              :input (:generated-forms opts)
              :path [:tests :generated-edn]
              :test #(test-edn % proc encoding)}
             {:pred (fn [_ _ o] (:time o))
              :desc "timing"
              :input transit-exemplars
              :path [:time]
              :test #(let [ms (test-timing % proc encoding)]
                       {:ms ms
                        :count (count transit-exemplars)
                        :encoding encoding})}])))

  stream which can be used to send data to the process, `:p` the
  process and `:reader` a transit reader."
  [command encoding]
  (let [p (.start (ProcessBuilder. [command (name encoding)]))
        out (BufferedOutputStream. (.getOutputStream p))
        in (BufferedInputStream. (.getInputStream p))]
    ;; for JSON, r/reader does not return until data starts to flow
    ;; over input stream
    {:out out :p p :reader (future (r/reader in encoding))}))

(defn stop-process
