File tree Expand file tree Collapse file tree
test/lambdaisland/deep_diff2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
2526
2627(deftest print-doc-test
2728 (testing " date"
28- (is (= " \u 001B[31m-#inst \" 2019-04-09T14:57:46.128-00:00\"\u 001B[0m \u 001B[32m+#inst \" 2019-04-10T14:57:46.128-00:00\"\u 001B[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 " \u 001B[31m-#inst \" 2019-04-09T14:57:46.128-00:00\"\u 001B[0m \u 001B[32m+#inst \" 2019-04-10T14:57:46.128-00:00\"\u 001B[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
You can’t perform that action at this time.
0 commit comments