Skip to content

Commit

Permalink
Use system newlines when joining string output in test
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcompton committed Feb 10, 2018
1 parent c7fb037 commit e068571
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions kibit/test/kibit/test/reporters.clj
Expand Up @@ -10,20 +10,21 @@

(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)
:alt '(inc x)} ["At some/file.clj:30:"
"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)
Expand All @@ -36,4 +37,5 @@
"instead of:"
"```clojure"
" (+ x 1)"
"```"]))
"```"
"" ""]))

0 comments on commit e068571

Please sign in to comment.