mirror of https://github.com/sbt/sbt.git
Adding test for broken "set every", see #1430
To test, use: > scripted tests/set-every
This commit is contained in:
parent
0f88b7a4f3
commit
3d981177df
|
|
@ -0,0 +1,16 @@
|
|||
val a = project.settings(version := "2.8.1")
|
||||
|
||||
val trySetEvery = taskKey[Unit]("Tests \"set every\"")
|
||||
|
||||
trySetEvery := {
|
||||
val s = state.value
|
||||
val extracted = Project.extract(s)
|
||||
import extracted._
|
||||
val allProjs = structure.allProjectRefs
|
||||
val Some(aProj) = allProjs.find(_.project == "a")
|
||||
val aVer = (version in aProj get structure.data).get
|
||||
if (aVer != "1.0") {
|
||||
println("Version of project a: " + aVer + ", expected: 1.0")
|
||||
error("\"set every\" did not change the version of all projects.")
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
> set every version := '"1.0"'
|
||||
> trySetEvery
|
||||
|
||||
Loading…
Reference in New Issue