From e06857182d33d914ffa5640cf0640e1faae6a420 Mon Sep 17 00:00:00 2001 From: Daniel Compton Date: Sat, 10 Feb 2018 21:20:24 +1300 Subject: [PATCH] Use system newlines when joining string output in test --- kibit/test/kibit/test/reporters.clj | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/kibit/test/kibit/test/reporters.clj b/kibit/test/kibit/test/reporters.clj index e66fb46..4671d17 100644 --- a/kibit/test/kibit/test/reporters.clj +++ b/kibit/test/kibit/test/reporters.clj @@ -10,8 +10,8 @@ (deftest plain (are [check-map result] - (= (reported-lines (with-out-str (reporters/cli-reporter check-map))) - result) + (= (with-out-str (reporters/cli-reporter check-map)) + (string/join (System/getProperty "line.separator") result)) {:file "some/file.clj" :line 30 :expr '(+ x 1) @@ -19,11 +19,12 @@ "Consider using:" " (inc x)" "instead of:" - " (+ x 1)"])) + " (+ x 1)" + "" ""])) (deftest gfm (are [check-map result] - (= (reported-lines (with-out-str (reporters/gfm-reporter check-map))) - result) + (= (with-out-str (reporters/gfm-reporter check-map)) + (string/join (System/getProperty "line.separator") result)) {:file "some/file.clj" :line 30 :expr '(+ x 1) @@ -36,4 +37,5 @@ "instead of:" "```clojure" " (+ x 1)" - "```"])) + "```" + "" ""]))