mirror of https://github.com/sbt/sbt.git
Reorganize test structure for `mainSettings`
This commit is contained in:
parent
2692bec21d
commit
5b7180cfa7
|
|
@ -1,2 +1,3 @@
|
|||
target/
|
||||
__pycache__
|
||||
toolbox.classpath
|
||||
|
|
|
|||
|
|
@ -285,7 +285,9 @@ lazy val generateToolboxClasspath = Def.task {
|
|||
resourceDir.mkdir() // In case it doesn't exist
|
||||
val toolboxTestClasspath = resourceDir / "toolbox.classpath"
|
||||
IO.write(toolboxTestClasspath, classpath)
|
||||
List(toolboxTestClasspath.getAbsoluteFile)
|
||||
val result = List(toolboxTestClasspath.getAbsoluteFile)
|
||||
streams.value.log.success("Wrote the classpath for the macro neg test suite.")
|
||||
result
|
||||
}
|
||||
|
||||
// Fixes scope=Scope for Setting (core defined in collectionProj) to define the settings system used in build definitions
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ package sbt.std
|
|||
import scala.reflect._
|
||||
|
||||
object TestUtil {
|
||||
import scala.language.postfixOps
|
||||
import tools.reflect.{ ToolBox, ToolBoxError }
|
||||
|
||||
def intercept[T <: Throwable: ClassTag](test: => Any): T = {
|
||||
|
|
@ -42,7 +41,7 @@ object TestUtil {
|
|||
|
||||
def expectError(errorSnippet: String,
|
||||
compileOptions: String = "-Xmacro-settings:debug-spores",
|
||||
baseCompileOptions: String = s"-cp $toolboxClasspath")(code: String) {
|
||||
baseCompileOptions: String = s"-cp $toolboxClasspath")(code: String): Unit = {
|
||||
val errorMessage = intercept[ToolBoxError] {
|
||||
eval(code, s"$compileOptions $baseCompileOptions")
|
||||
}.getMessage
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package sbt
|
||||
package std
|
||||
package sbt.std
|
||||
|
||||
import sbt.internal.util.complete
|
||||
import sbt.internal.util.complete.DefaultParsers
|
||||
import sbt.{Def, InputTask, Task}
|
||||
|
||||
/*object UseTask
|
||||
{
|
||||
|
|
@ -20,7 +20,8 @@ import sbt.internal.util.complete.DefaultParsers
|
|||
}*/
|
||||
object Assign {
|
||||
import java.io.File
|
||||
import Def.{ Initialize, inputKey, macroValueT, parserToInput, settingKey, taskKey }
|
||||
|
||||
import Def.{Initialize, inputKey, macroValueT, parserToInput, settingKey, taskKey}
|
||||
// import UseTask.{x,y,z,a,set,plain}
|
||||
|
||||
val ak = taskKey[Int]("a")
|
||||
Loading…
Reference in New Issue