ExUnit.Filters
Conveniences for parsing and evaluating filters.
Summary
| eval(include, exclude, tags) | Evaluates the include and exclude filters against the given tags. Expects filters to be normalized into a keyword list where each key is an atom and the value is a list |
| parse(filters) | Parses the given filters, as one would receive from the command line |
Functions
Specs:
- eval(Keyword.t([]), Keyword.t([]), Keyword.t) :: :ok | {:error, atom}
Evaluates the include and exclude filters against the given tags. Expects filters to be normalized into a keyword list where each key is an atom and the value is a list.
Examples
iex> ExUnit.Filters.eval([foo: "bar"], [:foo], [foo: "bar"])
:ok
iex> ExUnit.Filters.eval([foo: "bar"], [:foo], [foo: "baz"])
{ :error, :foo }