pub const FILTERSET_REFERENCE_MD: &str = "## Reference\n\n### Basic predicates\n\n`all()`\n: Include all tests.\n\n`none()`\n: Include no tests.\n\n`test(name-matcher)`\n: Include all tests matching `name-matcher`.\n\n`group(name-matcher)` <!-- md:version 0.9.133 -->\n: Include all tests in [test groups](../configuration/test-groups.md) matching `name-matcher`. This predicate can only be used on the command line.\n\n`package(name-matcher)`\n: Include all tests in packages (crates) matching `name-matcher`.\n\n`deps(name-matcher)`\n: Include all tests in crates matching `name-matcher`, and all of their (possibly transitive) dependencies.\n\n`rdeps(name-matcher)`\n: Include all tests in crates matching `name-matcher`, and all the crates that (possibly transitively) depend on `name-matcher`.\n\n`binary_id(name-matcher)`\n: Include all tests in [binary IDs](../glossary.md#binary-id) matching `name-matcher`. Covers all of `package()`, `kind()` and `binary()`.\n\n`kind(name-matcher)`\n: Include all tests in binary kinds matching `name-matcher`. See [_Binary kinds_](#binary-kinds) below.\n\n`binary(name-matcher)`\n: Include all tests in binary names matching `name-matcher`. For unit tests, the binary name is the same as the name of the crate. Otherwise, it\'s the name of the integration test, benchmark, or binary target.\n\n`platform(host)` or `platform(target)`\n: Include all tests that are [built for the host or target platform](../selecting.md#filtering-by-build-platform), respectively.\n\n`default()` <!-- md:version 0.9.75 -->\n: The default set of tests to run; see [_Running a subset of tests by default_](../selecting.md#running-a-subset-of-tests-by-default) for more information.\n\n!!! tip \"Binary exclusions\"\n\n If a filterset always excludes a particular binary, it will not be run, even to\n get the list of tests within it. This means that a command like:\n\n cargo nextest list -E \'platform(host)\'\n\n will not execute any test binaries built for the target platform.\n\n This is generally what you want, but if you would like to list tests anyway, include a\n `test()` predicate. For example, to list test binaries for the target platform (using,\n for example, a [target runner](../features/target-runners.md)), but skip running them:\n\n cargo nextest list -E \'platform(host) + not test(/.*/)\' --verbose\n\n### Operators\n\n`set1 & set2`, `set1 and set2`\n: The intersection of `set1` and `set2`.\n\n`set1 | set2`, `set1 + set2`, `set1 or set2`\n: The union of `set1` or `set2`.\n\n`not set`, `!set`\n: Include everything not included in `set`\n\n`set1 - set2`\n: Everything in `set1` that isn\'t in `set2`. Equivalent to `set1 and not set2`.\n\n`(set)`\n: Include everything in `set`.\n\n#### Operator precedence\n\nIn order from highest to lowest, or in other words from tightest to loosest binding:\n\n1. `()`\n2. `not`, `!`\n3. `and`, `&`, `-`\n4. `or`, `|`, `+`\n\nWithin a precedence group, operators bind from left to right.\n\n!!! info \"Examples\"\n\n - `test(a) & test(b) | test(c)` is equivalent to `(test(a) & test(b)) | test(c)`.\n - `test(a) | test(b) & test(c)` is equivalent to `test(a) | (test(b) & test(c))`.\n - `test(a) & test(b) - test(c)` is equivalent to `(test(a) & test(b)) - test(c)`.\n - `not test(a) | test(b)` is equivalent to `(not test(a)) | test(b)`.\n\n### Binary kinds\n\nAccepted by the `kind()` operator, these binary kinds match the ones defined by Cargo.\n\n`lib`\n: Unit tests for regular crates, typically in the `src/` directory under `#[cfg(test)]`.\n\n`test`\n: Integration tests, typically in the `tests/` directory.\n\n`bench`\n: Benchmark tests. For example, see [_Criterion benchmarks_](../integrations/criterion.md).\n\n`proc-macro`\n: Unit tests for proc-macro crates, in the `src/` directory under `#[cfg(test)]`.\n\n`bin`\n: Tests within `[[bin]]` targets (uncommon).\n\n`example`\n: Tests within examples (uncommon).\n\n### Name matchers\n\nThis defines the general syntax for matching against names.\n\n`=string`\n: _Equality matcher_\u{2014}match a package or test name that\'s equal to `string`.\n\n`~string`\n: _Contains matcher_\u{2014}match a package or test name containing `string`.\n\n`/regex/`\n: _Regex matcher_\u{2014}match a package or test name if any part of it matches the regular expression `regex`. To match the entire string against a regular expression, use `/^regex$/`. The implementation uses the [regex](https://github.com/rust-lang/regex) crate.\n\n`#glob`\n: _Glob matcher_\u{2014}match a package or test name if the full name matches the glob expression `glob`. The implementation uses the [globset crate](https://docs.rs/globset).\n\n`string`\n: Default matching strategy for the predicate.\n\n#### Default matchers\n\nFor `test()` predicates, the default matching strategy is the _contains matcher_, equivalent to `~string`.\n\nFor `group()` predicates, the default matching strategy is the _glob matcher_, equivalent to `#string`.\n\nFor package-related predicates (`package()`, `deps()`, and `rdeps()`), this is the _glob matcher_, equivalent to `#string`.\n\nFor binary-related predicates (`binary()` and `binary_id()`), this is also the _glob matcher_.\n\nFor `kind()` and `platform()`, this is the _equality matcher_, equivalent to `=string`.\n\n!!! warning\n\n If you\'re constructing an expression string programmatically, **always use a prefix** to avoid ambiguity.\n\n#### Escape sequences\n\nThe _equality_, _contains_, and _glob_ matchers can contain escape sequences, preceded by a\nbackslash (`\\`).\n\n<div class=\"compact\" markdown>\n\n`\\n`\n: line feed\n\n`\\r`\n: carriage return\n\n`\\t`\n: tab\n\n`\\\\`\n: backslash\n\n`\\/`\n: forward slash\n\n`\\)`\n: closing parenthesis\n\n`\\,`\n: comma\n\n`\\u{7FFF}`\n: 24-bit Unicode character code (up to 6 hex digits)\n\n</div>\n\nFor the _glob matcher_, to match against a literal glob metacharacter such as `*` or `?`, enclose it in square brackets: `[*]` or `[?]`.\n\nAll other escape sequences are invalid.\n\nThe _regular expression_ matcher supports the same escape sequences that [the regex crate does](https://docs.rs/regex/latest/regex/#escape-sequences). This includes character classes like `\\d`. Additionally, `\\/` is interpreted as an escaped `/`.\n";Expand description
The canonical filterset DSL reference.
This is used by the CLI to render cargo nextest help filterset. The
nextest website also renders it via an <!-- include --> snippet.