Add tests for -XX and mutiple -D

This commit is contained in:
Michael Hsu 2019-11-09 22:44:13 +08:00
parent fe43d0b975
commit c742f66dd8
1 changed files with 14 additions and 1 deletions

View File

@ -95,12 +95,25 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions {
}
test("sbt with -Xms2048M -Xmx2048M -Xss6M in SBT_OPTS") {
if (isWindows) cancel("Test not supported on windows")
val out = sbtProcessWithOpts("compile -v", "", "-Xms2048M -Xmx2048M -Xss6M").!!.linesIterator.toList
assert(out.contains[String]("-Xss6M"))
()
}
test("sbt with -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080 in SBT_OPTS") {
val out = sbtProcessWithOpts("compile -v", "", "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080").!!.linesIterator.toList
assert(out.contains[String]("-Dhttp.proxyHost=proxy"))
assert(out.contains[String]("-Dhttp.proxyPort=8080"))
()
}
test("sbt with -XX:ParallelGCThreads=16 -XX:PermSize=128M in SBT_OPTS") {
val out = sbtProcessWithOpts("compile -v", "", "-XX:ReservedCodeCacheSize=256m -XX:MaxPermSize=256m").!!.linesIterator.toList
assert(out.contains[String]("-XX:ParallelGCThreads=16"))
assert(out.contains[String]("-XX:PermSize=128M"))
()
}
test("sbt with --no-colors in SBT_OPTS") {
if (isWindows) cancel("Test not supported on windows")
val out = sbtProcessWithOpts("compile -v", "", "--no-colors").!!.linesIterator.toList