mirror of https://github.com/sbt/sbt.git
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:
parent
bf6814580c
commit
69ed60653c
|
|
@ -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)
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
class Bar {
|
||||
|
|
@ -0,0 +1 @@
|
|||
class Foo
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
> checkSources Foo.scala
|
||||
|
||||
> compile
|
||||
|
||||
> set Compile / excludeFilter := HiddenFileFilter
|
||||
|
||||
> checkSources Foo.scala Bar.scala
|
||||
|
||||
-> compile
|
||||
Loading…
Reference in New Issue