@@ -3,12 +3,14 @@ package progscala3.forcomps
3
3
4
4
import munit .*
5
5
6
+ import java .lang .System .lineSeparator
7
+
6
8
class RemoveBlanksSuite extends FunSuite :
7
9
var path = " src/test/scala/progscala3/forcomps/small-test-file.txt"
8
10
9
11
test(" RemoveBlanks removes blank lines in text" ) {
10
12
val lines = RemoveBlanks (path, compress = false , numbers = false )
11
- val actual = lines.mkString(" \n " )
13
+ val actual = lines.mkString(lineSeparator )
12
14
val expected =
13
15
""" This is a small
14
16
|test file""" .stripMargin
@@ -17,7 +19,7 @@ class RemoveBlanksSuite extends FunSuite:
17
19
18
20
test(" RemoveBlanks optionally compresses whitespace in text" ) {
19
21
val lines = RemoveBlanks (path, compress = true , numbers = false )
20
- val actual = lines.mkString(" \n " )
22
+ val actual = lines.mkString(lineSeparator )
21
23
val expected =
22
24
""" This is a small
23
25
|test file""" .stripMargin
@@ -26,7 +28,7 @@ class RemoveBlanksSuite extends FunSuite:
26
28
27
29
test(" RemoveBlanks optionally prints line numbers from the original text" ) {
28
30
val lines = RemoveBlanks (path, compress = true , numbers = true )
29
- val actual = lines.mkString(" \n " )
31
+ val actual = lines.mkString(lineSeparator )
30
32
val expected =
31
33
""" 1: This is a small
32
34
| 3: test file""" .stripMargin
0 commit comments