diff --git a/integration-test/src/test/scala/RunnerTest.scala b/integration-test/src/test/scala/RunnerTest.scala index 30cca6b5e..c5c1d4c80 100644 --- a/integration-test/src/test/scala/RunnerTest.scala +++ b/integration-test/src/test/scala/RunnerTest.scala @@ -9,10 +9,7 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions { lazy val sbtScript = if (isWindows) new File("target/universal/stage/bin/sbt.bat") else new File("target/universal/stage/bin/sbt") - def sbtProcess(arg: String) = - sbt.internal.Process(sbtScript.getAbsolutePath + " " + arg, new File("citest"), - "JAVA_OPTS" -> "", - "SBT_OPTS" -> "") + def sbtProcess(arg: String) = sbtProcessWithOpts(arg, "", "") def sbtProcessWithOpts(arg: String, javaOpts: String, sbtOpts: String) = sbt.internal.Process(sbtScript.getAbsolutePath + " " + arg, new File("citest"), "JAVA_OPTS" -> javaOpts, @@ -55,6 +52,12 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions { () } + test("sbt --sbt-version") { + val out = sbtProcess("--sbt-version 1.3.0 compile -v").!!.linesIterator.toList + assert(out.contains[String]("-Dsbt.version=1.3.0")) + () + } + test("sbt -mem 503") { val out = sbtProcess("compile -mem 503 -v").!!.linesIterator.toList assert(out.contains[String]("-Xmx503m"))