@@ -8,7 +8,7 @@ class DefaultTests extends WithWarmUpScalaCliSuite {
8
8
test(" running scala-cli with no args should default to repl" ) {
9
9
TestInputs .empty.fromRoot { root =>
10
10
val res = os.proc(TestUtil .cli, " --repl-dry-run" ).call(cwd = root, mergeErrIntoOut = true )
11
- expect(res.out.trim() == replDryRunOutput)
11
+ expect(res.out.lines().lastOption.contains( replDryRunOutput) )
12
12
}
13
13
}
14
14
test(" running scala-cli with no args should not accept run-only options" ) {
@@ -20,7 +20,7 @@ class DefaultTests extends WithWarmUpScalaCliSuite {
20
20
check = false
21
21
)
22
22
expect(res.exitCode == 1 )
23
- expect(res.out.trim() == unrecognizedArgMessage(runSpecificOption))
23
+ expect(res.out.lines().endsWith( unrecognizedArgMessage(runSpecificOption) ))
24
24
}
25
25
}
26
26
test(" running scala-cli with args should not accept repl-only options" ) {
@@ -32,7 +32,7 @@ class DefaultTests extends WithWarmUpScalaCliSuite {
32
32
check = false
33
33
)
34
34
expect(res.exitCode == 1 )
35
- expect(res.out.trim() == unrecognizedArgMessage(replSpecificOption))
35
+ expect(res.out.lines().endsWith( unrecognizedArgMessage(replSpecificOption) ))
36
36
}
37
37
}
38
38
@@ -112,7 +112,7 @@ class DefaultTests extends WithWarmUpScalaCliSuite {
112
112
)
113
113
.call(cwd = root, mergeErrIntoOut = true , check = false )
114
114
expect(res.exitCode == 1 )
115
- expect(res.out.trim() == unrecognizedArgMessage(replSpecificOption))
115
+ expect(res.out.lines().endsWith( unrecognizedArgMessage(replSpecificOption) ))
116
116
}
117
117
}
118
118
@@ -165,7 +165,7 @@ class DefaultTests extends WithWarmUpScalaCliSuite {
165
165
" -classpath" ,
166
166
(os.rel / compilationOutputDir).toString
167
167
).call(cwd = root, mergeErrIntoOut = true )
168
- expect(runRes.out.trim() == replDryRunOutput)
168
+ expect(runRes.out.lines().lastOption.contains( replDryRunOutput) )
169
169
}
170
170
}
171
171
@@ -189,7 +189,7 @@ class DefaultTests extends WithWarmUpScalaCliSuite {
189
189
|
190
190
|To list all available options, run
191
191
| ${Console .BOLD }${TestUtil .detectCliPath} --help ${Console .RESET }
192
- | """ .stripMargin.trim
192
+ | """ .stripMargin.trim.linesIterator.toVector
193
193
194
194
private lazy val replDryRunOutput = " Dry run, not running REPL."
195
195
}
0 commit comments