mirror of https://github.com/sbt/sbt.git
Remove unneeded test
This isn't testing anything useful after the refactoring that removed the implicit FileTree.Repository.
This commit is contained in:
parent
2d1c80f916
commit
4f6e38c805
|
|
@ -1,43 +0,0 @@
|
|||
import java.nio.file.Path
|
||||
|
||||
import sbt.Keys._
|
||||
import sbt.nio.file._
|
||||
import sbt.nio.Keys._
|
||||
|
||||
val allInputs = taskKey[Seq[File]]("")
|
||||
val allInputsExplicit = taskKey[Seq[File]]("")
|
||||
|
||||
val checkInputs = inputKey[Unit]("")
|
||||
val checkInputsExplicit = inputKey[Unit]("")
|
||||
|
||||
allInputs := (Compile / unmanagedSources / allFiles).value.map(_.toFile)
|
||||
|
||||
checkInputs := {
|
||||
val res = allInputs.value
|
||||
val scala = (Compile / scalaSource).value
|
||||
val expected = Def.spaceDelimited("<args>").parsed.map(scala / _).toSet
|
||||
assert(res.toSet == expected)
|
||||
}
|
||||
|
||||
// In this test we override the FileTree.Repository used by the all method.
|
||||
allInputsExplicit := {
|
||||
val files = scala.collection.mutable.Set.empty[File]
|
||||
val underlying = fileTreeView.value
|
||||
val view: FileTreeView[(Path, FileAttributes)] = new FileTreeView[(Path, FileAttributes)] {
|
||||
override def list(path: Path): Seq[(Path, FileAttributes)] = {
|
||||
val res = underlying.list(path)
|
||||
files ++= res.map(_._1.toFile)
|
||||
res
|
||||
}
|
||||
}
|
||||
val include = (Compile / unmanagedSources / includeFilter).value
|
||||
view.list((Compile / unmanagedSources / fileInputs).value)
|
||||
files.filter(include.accept).toSeq
|
||||
}
|
||||
|
||||
checkInputsExplicit := {
|
||||
val res = allInputsExplicit.value
|
||||
val scala = (Compile / scalaSource).value
|
||||
val expected = Def.spaceDelimited("<args>").parsed.map(scala / _).toSet
|
||||
assert(res.toSet == expected)
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
package bar
|
||||
|
||||
object Bar
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
package foo
|
||||
|
||||
object Foo
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
> checkInputs foo/Foo.scala bar/Bar.scala
|
||||
|
||||
> checkInputsExplicit foo/Foo.scala bar/Bar.scala
|
||||
Loading…
Reference in New Issue