-
Notifications
You must be signed in to change notification settings - Fork 1k
Support ... as testOnly pattern #8576
Copy link
Copy link
Closed
Milestone
Description
Problem
Currently testOnly supports glob expression like **.
> testOnly **.SomethingTest
This is fine, but ** is somewhat inconvenient from Bash because Bash itself would expand the glob expression.
Expectations
In addition to **, we should support ... by substituting ... with **, so we can write the following:
$ sbt --client testOnly ...SomethingTest
Note
sbt/main/src/main/scala/sbt/Defaults.scala
Lines 2490 to 2501 in 215e9d6
| private def distinctParser(exs: Set[String], raw: Boolean): Parser[Seq[String]] = { | |
| import DefaultParsers.* | |
| import Parser.and | |
| val base = token(Space) ~> token(and(NotSpace, not("--", "Unexpected: ---")).examples(exs)) | |
| val recurse = base flatMap { ex => | |
| val (matching, notMatching) = exs.partition(GlobFilter(ex).accept) | |
| distinctParser(notMatching, raw) map { result => | |
| if (raw) ex +: result else matching.toSeq ++ result | |
| } | |
| } | |
| recurse ?? Nil | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels