Skip to content

Commit 53315be

Browse files
committed
more platform line separators
1 parent 99449a7 commit 53315be

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/clojure/clojure/tools/build/tasks/uber.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
(defn- conflict-append
7070
[{:keys [path in]}]
71-
{:write {path {:string (str "\n" (stream->string in)), :append true}}})
71+
{:write {path {:string (str (System/lineSeparator) (stream->string in)), :append true}}})
7272

7373
(defn- conflict-append-dedupe
7474
[{:keys [path in ^File existing state] :as _params}]
@@ -82,7 +82,7 @@
8282
{:state (assoc-in state [:append-dedupe path] seen)}
8383
;; record and append
8484
{:state (assoc-in state [:append-dedupe path] (conj seen new-content))
85-
:write {path {:string (str "\n" new-content), :append true}}})))
85+
:write {path {:string (str (System/lineSeparator) new-content), :append true}}})))
8686

8787
(defn conflict-data-readers
8888
[{:keys [path in ^File existing]}]

src/test/clojure/clojure/tools/build/tasks/test_uber.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@
127127
(slurp (project-path "target/unzip/overwrite.txt"))))
128128

129129
;; append files append
130-
(is (= (str (slurp (project-path "j1/append.txt")) "\n"
130+
(is (= (str (slurp (project-path "j1/append.txt")) (System/lineSeparator)
131131
(slurp (project-path "j2/append.txt")))
132132
(slurp (project-path "target/unzip/append.txt"))))
133133

134134
;; LICENSE files append but no dupes - include j1 and j2, but not j3 (dupe of j1)
135-
(is (= (str (slurp (project-path "j1/META-INF/LICENSE.txt")) "\n"
135+
(is (= (str (slurp (project-path "j1/META-INF/LICENSE.txt")) (System/lineSeparator)
136136
(slurp (project-path "j2/META-INF/LICENSE.txt")))
137137
(slurp (project-path "target/unzip/META-INF/LICENSE.txt"))))))
138138

0 commit comments

Comments
 (0)