mirror of https://github.com/sbt/sbt.git
miscellaneous fixes
This commit is contained in:
parent
29034f700b
commit
02f666ec0e
|
|
@ -9,9 +9,8 @@ object CompileTest extends Specification
|
||||||
{
|
{
|
||||||
"Analysis compiler" should {
|
"Analysis compiler" should {
|
||||||
"compile basic sources" in {
|
"compile basic sources" in {
|
||||||
WithCompiler( "2.7.4" )(testCompileAnalysis)
|
WithCompiler( "2.9.1" )(testCompileAnalysis)
|
||||||
WithCompiler( "2.7.5" )(testCompileAnalysis)
|
WithCompiler( "2.9.0-1" )(testCompileAnalysis)
|
||||||
WithCompiler( "2.7.7" )(testCompileAnalysis)
|
|
||||||
WithCompiler( "2.8.0" )(testCompileAnalysis)
|
WithCompiler( "2.8.0" )(testCompileAnalysis)
|
||||||
WithCompiler( "2.8.1" )(testCompileAnalysis)
|
WithCompiler( "2.8.1" )(testCompileAnalysis)
|
||||||
}
|
}
|
||||||
|
|
@ -19,10 +18,10 @@ object CompileTest extends Specification
|
||||||
|
|
||||||
"Raw compiler" should {
|
"Raw compiler" should {
|
||||||
"Properly handle classpaths" in {
|
"Properly handle classpaths" in {
|
||||||
testClasspath("2.7.4")
|
testClasspath("2.9.1")
|
||||||
testClasspath("2.7.7")
|
testClasspath("2.9.0-1")
|
||||||
testClasspath("2.8.0")
|
|
||||||
testClasspath("2.8.1")
|
testClasspath("2.8.1")
|
||||||
|
testClasspath("2.8.0")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ package compiler
|
||||||
|
|
||||||
object TestCompile
|
object TestCompile
|
||||||
{
|
{
|
||||||
def allVersions = List("2.8.1", "2.9.0-1", "2.8.0")
|
def allVersions = List("2.8.1", "2.9.0-1", "2.8.0", "2.9.1")
|
||||||
/** Tests running the compiler interface with the analyzer plugin with a test callback. The test callback saves all information
|
/** Tests running the compiler interface with the analyzer plugin with a test callback. The test callback saves all information
|
||||||
* that the plugin sends it for post-compile analysis by the provided function.*/
|
* that the plugin sends it for post-compile analysis by the provided function.*/
|
||||||
def apply[T](scalaVersion: String, sources: Seq[File], outputDirectory: File, options: Seq[String])
|
def apply[T](scalaVersion: String, sources: Seq[File], outputDirectory: File, options: Seq[String])
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,10 @@ object ScalaProviderTest extends Specification
|
||||||
{
|
{
|
||||||
def provide = addToSusVerb("provide")
|
def provide = addToSusVerb("provide")
|
||||||
"Launch" should provide {
|
"Launch" should provide {
|
||||||
"ClassLoader for Scala 2.7.4" in { checkScalaLoader("2.7.4") }
|
|
||||||
"ClassLoader for Scala 2.7.5" in { checkScalaLoader("2.7.5") }
|
|
||||||
"ClassLoader for Scala 2.7.7" in { checkScalaLoader("2.7.7") }
|
|
||||||
"ClassLoader for Scala 2.8.0" in { checkScalaLoader("2.8.0") }
|
"ClassLoader for Scala 2.8.0" in { checkScalaLoader("2.8.0") }
|
||||||
"ClassLoader for Scala 2.8.1" in { checkScalaLoader("2.8.1") }
|
"ClassLoader for Scala 2.8.1" in { checkScalaLoader("2.8.1") }
|
||||||
"ClassLoader for Scala 2.9.0-1" in { checkScalaLoader("2.9.0-1") }
|
"ClassLoader for Scala 2.9.0-1" in { checkScalaLoader("2.9.0-1") }
|
||||||
|
"ClassLoader for Scala 2.9.1" in { checkScalaLoader("2.9.1") }
|
||||||
}
|
}
|
||||||
|
|
||||||
"Launch" should {
|
"Launch" should {
|
||||||
|
|
@ -74,7 +72,7 @@ object LaunchTest
|
||||||
|
|
||||||
def mapScalaVersion(versionNumber: String) = scalaVersionMap.find(_._2 == versionNumber).getOrElse {
|
def mapScalaVersion(versionNumber: String) = scalaVersionMap.find(_._2 == versionNumber).getOrElse {
|
||||||
error("Scala version number " + versionNumber + " from library.properties has no mapping")}._1
|
error("Scala version number " + versionNumber + " from library.properties has no mapping")}._1
|
||||||
val scalaVersionMap = Map("2.9.0-1" -> "2.9.0.1") ++ List("2.7.4", "2.7.5", "2.7.6", "2.7.7", "2.8.0", "2.8.1").map(v => (v, v + ".final"))
|
val scalaVersionMap = Map("2.9.0-1" -> "2.9.0.1") ++ List("2.8.0", "2.8.1", "2.9.1").map(v => (v, v + ".final"))
|
||||||
def getScalaVersion: String = getScalaVersion(getClass.getClassLoader)
|
def getScalaVersion: String = getScalaVersion(getClass.getClassLoader)
|
||||||
def getScalaVersion(loader: ClassLoader): String = loadProperties(loader, "library.properties").getProperty("version.number")
|
def getScalaVersion(loader: ClassLoader): String = loadProperties(loader, "library.properties").getProperty("version.number")
|
||||||
lazy val AppVersion = loadProperties(getClass.getClassLoader, "xsbt.version.properties").getProperty("version")
|
lazy val AppVersion = loadProperties(getClass.getClassLoader, "xsbt.version.properties").getProperty("version")
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ Multi + " command1 " + Multi + """ command2 ...
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def AppendCommand = "append"
|
def AppendCommand = "append"
|
||||||
def AppendLastBrief = (Append + " command", AppendLastDetailed)
|
def AppendLastBrief = (AppendCommand + " command", AppendLastDetailed)
|
||||||
def AppendLastDetailed = "Appends `command` to list of commands to run."
|
def AppendLastDetailed = "Appends `command` to list of commands to run."
|
||||||
|
|
||||||
val AliasCommand = "alias"
|
val AliasCommand = "alias"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
> use/compile
|
# done this way because last modified times often have ~1s resolution
|
||||||
|
> use/package
|
||||||
|
$ sleep 2000
|
||||||
|
|
||||||
$ copy-file changes/Break.scala dep/A.scala
|
$ copy-file changes/Break.scala dep/A.scala
|
||||||
-> use/compile
|
-> use/compile
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,10 @@ $ copy-file changes/B.scala B.scala
|
||||||
$ copy-file changes/A1.scala a/A.scala
|
$ copy-file changes/A1.scala a/A.scala
|
||||||
> run 1
|
> run 1
|
||||||
$ copy-file changes/A2.scala a/A.scala
|
$ copy-file changes/A2.scala a/A.scala
|
||||||
|
$ sleep 2000
|
||||||
> run 2
|
> run 2
|
||||||
$ copy-file changes/A3.scala a/A.scala
|
$ copy-file changes/A3.scala a/A.scala
|
||||||
|
$ sleep 2000
|
||||||
> run 3
|
> run 3
|
||||||
|
|
||||||
$ copy-file changes/build2.sbt build.sbt
|
$ copy-file changes/build2.sbt build.sbt
|
||||||
|
|
@ -13,6 +15,8 @@ $ copy-file changes/build2.sbt build.sbt
|
||||||
$ copy-file changes/A1.scala a/A.scala
|
$ copy-file changes/A1.scala a/A.scala
|
||||||
> run 1
|
> run 1
|
||||||
$ copy-file changes/A2.scala a/A.scala
|
$ copy-file changes/A2.scala a/A.scala
|
||||||
|
$ sleep 2000
|
||||||
> run 2
|
> run 2
|
||||||
$ copy-file changes/A3.scala a/A.scala
|
$ copy-file changes/A3.scala a/A.scala
|
||||||
|
$ sleep 2000
|
||||||
> run 3
|
> run 3
|
||||||
Loading…
Reference in New Issue