You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+5-3
Original file line number
Diff line number
Diff line change
@@ -2636,7 +2636,9 @@ Label filters can operate on sets using the notation: `KEY: SET_OPERATION <ARGUM
2636
2636
|`consistsOf`|`SINGLE_VALUE` or `{VALUE1, VALUE2, ...}`| Matches if the `KEY` set contains _exactly_ the elements in `ARGUMENT`|
2637
2637
|`isSubsetOf`|`SINGLE_VALUE` or `{VALUE1, VALUE2, ...}`| Matches if the elements in the `KEY` set are a subset of the elements in `ARGUMENT`|
2638
2638
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.
2640
2642
2641
2643
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.
2642
2644
@@ -2645,11 +2647,11 @@ Some more examples:
2645
2647
| Query | Behavior |
2646
2648
| --- | --- |
2647
2649
|`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`|
2649
2651
|`ginkgo --label-filter="Readiness: isEmpty"`| Match any specs for which the `Readiness` set is empty |
2650
2652
|`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`|
2651
2653
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.
0 commit comments