Skip to content

Commit 966a28c

Browse files
onsipohly
andcommitted
Fix typos in label sets docs
Co-authored-by: Patrick Ohly <[email protected]>
1 parent cd231fd commit 966a28c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/index.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -2636,7 +2636,9 @@ Label filters can operate on sets using the notation: `KEY: SET_OPERATION <ARGUM
26362636
| `consistsOf` | `SINGLE_VALUE` or `{VALUE1, VALUE2, ...}` | Matches if the `KEY` set contains _exactly_ the elements in `ARGUMENT` |
26372637
| `isSubsetOf` | `SINGLE_VALUE` or `{VALUE1, VALUE2, ...}` | Matches if the elements in the `KEY` set are a subset of the elements in `ARGUMENT` |
26382638

2639-
leading and trailing whitespace is alwasy trimmed around keys and values and comparisons are always case-insensitive. Keys and values in the filter-language set operations are always literals; regular expressions are not supported. A special note should be made about the behavior of `isSubsetOf`: if the `KEY` set is empty then the filter will always match. This is because an empty set is always a subset of any other set.
2639+
Leading and trailing whitespace is alwasy trimmed around keys and values and comparisons are always case-insensitive. Keys and values in the filter-language set operations are always literals; regular expressions are not supported.
2640+
2641+
A special note should be made about the behavior of `isSubsetOf`: if the `KEY` set is empty then the filter will always match. This is because an empty set is always a subset of any other set.
26402642

26412643
You can combine set operations with other label filters using the logical operators. For example: `ginkgo --label-filter="integration && !slow && Readiness: isSubsetOf {Beta, RC}"` will run all tests that have the label `integration`, do not have the label `slow` and have a `Readiness` set that is a subset of `{Beta, RC}`. This would exclude `Readiness:Alpha` but include specs with `Readiness:Beta` and `Readiness:RC` as well as specs with no `Readiness:*` label.
26422644

@@ -2645,11 +2647,11 @@ Some more examples:
26452647
| Query | Behavior |
26462648
| --- | --- |
26472649
| `ginkgo --label-filter="API: consistsOf {Library, Geo}"` | Match any specs for which the `API` set contains exactly `Library` and `Geo` |
2648-
| `ginkgo --label-filter="API: containsAny Library"` | Match any specs for which the `API` set contains either `Library` |
2650+
| `ginkgo --label-filter="API: containsAny Library"` | Match any specs for which the `API` set contains `Library` |
26492651
| `ginkgo --label-filter="Readiness: isEmpty"` | Match any specs for which the `Readiness` set is empty |
26502652
| `ginkgo --label-filter="Readiness: isSubsetOf Beta && !(API: containsAny Geo)"` | Match any specs for which the `Readiness` set is a subset of `{Beta}` (or empty) and the `API` set does not contain `Geo` |
26512653

2652-
Label sets are helpful for organizing and filtering large spec suites in which different specs satisfy multiple overlapping concerns. The use of label set filters is intended to be a more powerful and expressive alterantive to the use of regular expressions. If you find yourself using a regular expression, consider if you should be using a label set instead.
2654+
Label sets are helpful for organizing and filtering large spec suites in which different specs satisfy multiple overlapping concerns. The use of label set filters is intended to be a more powerful and expressive alternative to the use of regular expressions. If you find yourself using a regular expression, consider if you should be using a label set instead.
26532655

26542656
##### Listing Labels
26552657

0 commit comments

Comments
 (0)