-
Notifications
You must be signed in to change notification settings - Fork 128
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 #868 from romanowski/repl-fixes
Start repl with scalac options
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
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
22 changes: 22 additions & 0 deletions
22
modules/integration/src/test/scala/scala/cli/integration/ReplTests.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package scala.cli.integration | ||
|
||
import com.eed3si9n.expecty.Expecty.expect | ||
|
||
class ReplTests extends munit.FunSuite { | ||
|
||
test("calling repl with -Xshow-phases flag") { | ||
val cmd = Seq[os.Shellable]( | ||
TestUtil.cli, | ||
"repl", | ||
"-Xshow-phases" | ||
) | ||
|
||
val builder = new StringBuilder | ||
val readLines = os.ProcessOutput.Readlines(s => builder.append(s)) | ||
val res = os.proc(cmd).call(stdout = readLines, stderr = readLines) | ||
expect(res.exitCode == 0) | ||
val output = builder.mkString | ||
expect(output.contains("parser") && output.contains("typer")) | ||
} | ||
|
||
} |