Remove unneeded test

This isn't testing anything useful after the refactoring that removed
the implicit FileTree.Repository.
This commit is contained in:
Ethan Atkins 2019-04-17 21:48:02 -07:00
parent 2d1c80f916
commit 4f6e38c805
4 changed files with 0 additions and 52 deletions

View File

@ -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)
}

View File

@ -1,3 +0,0 @@
package bar
object Bar

View File

@ -1,3 +0,0 @@
package foo
object Foo

View File

@ -1,3 +0,0 @@
> checkInputs foo/Foo.scala bar/Bar.scala
> checkInputsExplicit foo/Foo.scala bar/Bar.scala