Add scripted test for excludeFilter

It was reported in #4868 that exclueFilters didn't work correctly if
there was an || in the filter. This was an upstream issue in io, but
this commit adds a scripted test in sbt.
This commit is contained in:
Ethan Atkins 2019-07-16 11:46:55 -07:00
parent bf6814580c
commit 69ed60653c
4 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,8 @@
Compile / excludeFilter := "Bar.scala" || "Baz.scala"
val checkSources = inputKey[Unit]("Check that the compile sources match the input file names")
checkSources := {
val sources = Def.spaceDelimited("").parsed.toSet
val actual = (Compile / unmanagedSources).value.map(_.getName).toSet
assert(sources == actual)
}

View File

@ -0,0 +1 @@
class Bar {

View File

@ -0,0 +1 @@
class Foo

View File

@ -0,0 +1,9 @@
> checkSources Foo.scala
> compile
> set Compile / excludeFilter := HiddenFileFilter
> checkSources Foo.scala Bar.scala
-> compile