Filter tests by regular expression
5nord opened this issue · comments
Description
Test tags are a fundamental mechanism to group tests. Convenience functions for selecting tests based on tags would significantly improve user experience.
Proposal
Add filter options to k3 list
:
-r <regex>, --tests-regex <regex>
: List tests matching regular expression.-R <regex>, --tags-regex <regex>
: List tests with tags matching regular expression-x <regex>, --tests-regex <regex>
: Exclude tests matching regular expresion.-X <regex>, --tags-exclude <regex>
: Exclude tests with labels matching regular expression
<regex>
for tags is used to specify case insensitive, colon separated regular expressions for trimmed tag name and tag value. Example:
$ k3 list --tags-regex '@author: John.*' --tags-exclude '@WIP'
Please note above regex would match following tags:
// @author: John Doe
// @author John Doe
// @AUTHOR: John Doe