mirror of https://github.com/sbt/sbt.git
Add integration tests
This commit is contained in:
parent
2946025d75
commit
8affb84ff7
|
|
@ -9,10 +9,7 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions {
|
||||||
lazy val sbtScript =
|
lazy val sbtScript =
|
||||||
if (isWindows) new File("target/universal/stage/bin/sbt.bat")
|
if (isWindows) new File("target/universal/stage/bin/sbt.bat")
|
||||||
else new File("target/universal/stage/bin/sbt")
|
else new File("target/universal/stage/bin/sbt")
|
||||||
def sbtProcess(arg: String) =
|
def sbtProcess(arg: String) = sbtProcessWithOpts(arg, "", "")
|
||||||
sbt.internal.Process(sbtScript.getAbsolutePath + " " + arg, new File("citest"),
|
|
||||||
"JAVA_OPTS" -> "",
|
|
||||||
"SBT_OPTS" -> "")
|
|
||||||
def sbtProcessWithOpts(arg: String, javaOpts: String, sbtOpts: String) =
|
def sbtProcessWithOpts(arg: String, javaOpts: String, sbtOpts: String) =
|
||||||
sbt.internal.Process(sbtScript.getAbsolutePath + " " + arg, new File("citest"),
|
sbt.internal.Process(sbtScript.getAbsolutePath + " " + arg, new File("citest"),
|
||||||
"JAVA_OPTS" -> javaOpts,
|
"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") {
|
test("sbt -mem 503") {
|
||||||
val out = sbtProcess("compile -mem 503 -v").!!.linesIterator.toList
|
val out = sbtProcess("compile -mem 503 -v").!!.linesIterator.toList
|
||||||
assert(out.contains[String]("-Xmx503m"))
|
assert(out.contains[String]("-Xmx503m"))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue