Skip to content

Commit 9003c7d

Browse files
committed
Fix Windows
1 parent 755f408 commit 9003c7d

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

test/lambdaisland/deep_diff2/printer_test.cljc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
(ns lambdaisland.deep-diff2.printer-test
22
(:require [clojure.test :refer [deftest testing is are]]
33
[lambdaisland.deep-diff2.diff-impl :as diff]
4-
[lambdaisland.deep-diff2.printer-impl :as printer])
4+
[lambdaisland.deep-diff2.printer-impl :as printer]
5+
[clojure.string :as str])
56
#?(:clj
67
(:import (java.sql Timestamp)
78
(java.util Date
@@ -25,9 +26,10 @@
2526

2627
(deftest print-doc-test
2728
(testing "date"
28-
(is (= "\u001B[31m-#inst \"2019-04-09T14:57:46.128-00:00\"\u001B[0m \u001B[32m+#inst \"2019-04-10T14:57:46.128-00:00\"\u001B[0m\n"
29-
(printed (diff/diff #inst "2019-04-09T14:57:46.128-00:00"
30-
#inst "2019-04-10T14:57:46.128-00:00")))))
29+
(let [expected (str/replace "\u001B[31m-#inst \"2019-04-09T14:57:46.128-00:00\"\u001B[0m \u001B[32m+#inst \"2019-04-10T14:57:46.128-00:00\"\u001B[0m\n" "\r\n" "\n")]
30+
(is (= expected
31+
(printed (diff/diff #inst "2019-04-09T14:57:46.128-00:00"
32+
#inst "2019-04-10T14:57:46.128-00:00"))))))
3133

3234
#?(:bb nil ;; bb TimeStamp constructor not included as of 1.0.166
3335
:clj

0 commit comments

Comments
 (0)