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
|
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 |
|
} |
Problem
Currently testOnly supports glob expression like
**.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:Note
sbt/main/src/main/scala/sbt/Defaults.scala
Lines 2490 to 2501 in 215e9d6