Skip to content

Commit 498b051

Browse files
committed
Merge the redundant ReplTests into ReplTestDefinitions
1 parent ac183a3 commit 498b051

File tree

2 files changed

+33
-36
lines changed

2 files changed

+33
-36
lines changed

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,37 @@ abstract class ReplTestDefinitions extends ScalaCliSuite with TestScalaVersionAr
5353
expect(scalaVersionHelp.contains(s"(${Constants.defaultScala} by default)"))
5454
}
5555
}
56+
57+
test("calling repl with -Xshow-phases flag") {
58+
val cmd = Seq[os.Shellable](
59+
TestUtil.cli,
60+
"repl",
61+
"-Xshow-phases",
62+
extraOptions
63+
)
64+
65+
val res = os.proc(cmd).call(mergeErrIntoOut = true)
66+
expect(res.exitCode == 0)
67+
val output = res.out.text()
68+
expect(output.contains("parser"))
69+
expect(output.contains("typer"))
70+
}
71+
72+
test("calling repl with a directory with no scala artifacts") {
73+
val inputs = TestInputs(
74+
os.rel / "Testing.java" -> "public class Testing {}"
75+
)
76+
val cmd = Seq[os.Shellable](
77+
TestUtil.cli,
78+
"repl",
79+
"--repl-dry-run",
80+
".",
81+
extraOptions
82+
)
83+
inputs.fromRoot { root =>
84+
val res = os.proc(cmd)
85+
.call(cwd = root)
86+
expect(res.exitCode == 0)
87+
}
88+
}
5689
}

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

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)