Skip to content

Support ... as testOnly pattern #8576

@eed3si9n

Description

@eed3si9n

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions