-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch2 does not report unmatched parts of a partially-matched test spec #1449
Comments
This is actually true even if you run with just "test2". That is, you are told "No tests ran", but the test calls I think that:
|
You're right. The main issue can be fixed with some changes to the test case filtering mechanism. As for the exit code issue, going by the documentation, the command-line option |
This bug/feature request was reported in issue catchorg#1449. The new behaviour is to collect a list of matches per filter, and call the reporter's noMatchingTestCases if a filter has zero matches. Also, a non-zero exit code (2) is now returned if the option "-w NoTests" is active.
Description
Catch2's runTests function calls the reporter's noMatchingTestCases if no tests match the spec, but if some test matches some part of the spec, nothing reports that the rest of the spec matched nothing. In other words, if I pass "Test1 Test2" as command-line args, and "Test1" matches some test, nothing complains about the fact that "Test2" matched nothing. This can lead the user to believe that they're running all the tests in the spec when they are not.
Steps to reproduce
Create a test file with one test. Run it with command-line args that specify two tests: the existing test and
some other, non-existent test. Everything will be green and happy, with no indication that the second test was not found.
Extra information
The text was updated successfully, but these errors were encountered: