Skip to content

Commit 94c5fe2

Browse files
committed
Test for correct number of deprecation warnings when commas are used as separators for using directive values
1 parent bd247d6 commit 94c5fe2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,16 @@ class RunTestsDefault extends RunTestDefinitions
115115
) {
116116
val inputPath = os.rel / "example.sc"
117117
TestInputs(inputPath ->
118-
"""//> using options -Werror, -Wconf:cat=deprecation:e
118+
"""//> using options -Werror, -Wconf:cat=deprecation:e, -Wconf:cat=unused:e
119119
|println("Deprecation warnings should have been printed")
120120
|""".stripMargin)
121121
.fromRoot { root =>
122122
val res = os.proc(TestUtil.cli, "run", extraOptions, inputPath)
123123
.call(cwd = root, stderr = os.Pipe)
124-
val err = res.err.trim()
125-
expect(err.contains("Use of commas as separators is deprecated"))
124+
val err = res.err.trim()
125+
val expectedWarning = "Use of commas as separators is deprecated"
126+
expect(err.contains(expectedWarning))
127+
expect(err.linesIterator.count(_.contains(expectedWarning)) == 2)
126128
}
127129
}
128130
}

0 commit comments

Comments
 (0)