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
Describe the bug
Filtering a spec by tag using --tag A --tag B is currently broken as it only accepts the last filter entered.
Instead it should keep all paths that contain any of the tags.
Additional context
This is due to the following check constantly overriding previous results:
exclude = method.Value.Tags?.Exists(x => x == tag) != true;
The code may be rewritten, to remove the looping over includeTags by using the following:
var exclude = method.Value.Tags?.Exists(includeTags.Contains) != true;
Also, previously the enumerated collections were cloned, to not break the enumeration, after the rewrite the enumerators are reused (.ToArray() was removed)
Describe the bug
Filtering a spec by tag using
--tag A --tag B
is currently broken as it only accepts the last filter entered.Instead it should keep all paths that contain any of the tags.
Additional context
This is due to the following check constantly overriding previous results:
exclude = method.Value.Tags?.Exists(x => x == tag) != true;
The code may be rewritten, to remove the looping over includeTags by using the following:
Also, previously the enumerated collections were cloned, to not break the enumeration, after the rewrite the enumerators are reused (
.ToArray()
was removed)7025d61#diff-275851d6772d6a0a03b9aaf63017c87331d0334e274deeebd199fe8cd07cc521R34
7025d61#diff-275851d6772d6a0a03b9aaf63017c87331d0334e274deeebd199fe8cd07cc521R37
deleting from an collection that is currently enumerated is undefined behavior
The text was updated successfully, but these errors were encountered: