@@ -3,12 +3,14 @@ package progscala3.forcomps
33
44import munit .*
55
6+ import java .lang .System .lineSeparator
7+
68class RemoveBlanksSuite extends FunSuite :
79 var path = " src/test/scala/progscala3/forcomps/small-test-file.txt"
810
911 test(" RemoveBlanks removes blank lines in text" ) {
1012 val lines = RemoveBlanks (path, compress = false , numbers = false )
11- val actual = lines.mkString(" \n " )
13+ val actual = lines.mkString(lineSeparator )
1214 val expected =
1315 """ This is a small
1416 |test file""" .stripMargin
@@ -17,7 +19,7 @@ class RemoveBlanksSuite extends FunSuite:
1719
1820 test(" RemoveBlanks optionally compresses whitespace in text" ) {
1921 val lines = RemoveBlanks (path, compress = true , numbers = false )
20- val actual = lines.mkString(" \n " )
22+ val actual = lines.mkString(lineSeparator )
2123 val expected =
2224 """ This is a small
2325 |test file""" .stripMargin
@@ -26,7 +28,7 @@ class RemoveBlanksSuite extends FunSuite:
2628
2729 test(" RemoveBlanks optionally prints line numbers from the original text" ) {
2830 val lines = RemoveBlanks (path, compress = true , numbers = true )
29- val actual = lines.mkString(" \n " )
31+ val actual = lines.mkString(lineSeparator )
3032 val expected =
3133 """ 1: This is a small
3234 | 3: test file""" .stripMargin
0 commit comments