Fix windows tests

This commit is contained in:
Michiel Borkent 2021-07-10 14:00:14 +02:00
parent 0832b0a480
commit 02237c47ce

View file

@ -14,15 +14,19 @@
(set! *warn-on-reflection* true) (set! *warn-on-reflection* true)
(defn string-replace-if-windows [match replacement] (def normalize
(fn [s] (if main/windows?
(if main/windows? (fn [s] (if (string? s)
(str/replace s match replacement) (str/replace s "\r\n" "\n")
s))) s))
identity))
(def normalize (string-replace-if-windows "\r\n" "\n")) (def escape-file-paths
(if main/windows?
(def escape-file-paths (string-replace-if-windows "\\" "\\\\")) (fn [s] (if (string? s)
(str/replace s "\\" "\\\\")
s))
identity))
(def ^:dynamic *bb-edn-path* nil) (def ^:dynamic *bb-edn-path* nil)