-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1830 from lwronski/explain-message
Explain message
- Loading branch information
Showing
4 changed files
with
27 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 21 additions & 1 deletion
22
modules/integration/src/test/scala/scala/cli/integration/CompileTestsDefault.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
package scala.cli.integration | ||
|
||
class CompileTestsDefault extends CompileTestDefinitions(scalaVersionOpt = None) | ||
import com.eed3si9n.expecty.Expecty.expect | ||
class CompileTestsDefault extends CompileTestDefinitions(scalaVersionOpt = None) { | ||
test("render explain message") { | ||
val fileName = "Hello.scala" | ||
val inputs = TestInputs( | ||
os.rel / fileName -> // should be dump to 3.3.1 after release | ||
s"""//> using scala "3.3.1-RC1-bin-20230203-3ef1e73-NIGHTLY" | ||
|//> using options "--explain" | ||
| | ||
|class A | ||
|val i: Int = A() | ||
|""".stripMargin | ||
) | ||
inputs.fromRoot { root => | ||
val out = os.proc(TestUtil.cli, "compile", extraOptions, fileName) | ||
.call(cwd = root, check = false, mergeErrIntoOut = true).out.trim() | ||
|
||
expect(out.contains("Explanation")) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters