Fix CMake regex in ParseAndAddCatchTest helper - #2056
Conversation
Codecov Report
@@ Coverage Diff @@
## v2.x #2056 +/- ##
=======================================
Coverage 88.75% 88.75%
=======================================
Files 138 138
Lines 5651 5651
=======================================
Hits 5015 5015
Misses 636 636 |
|
Honestly this calls for a proper parser, because the new regex breaks |
|
Do you maybe also have an idea on how we could add tests for the parser, that such oversights are covered by the test cases? |
|
I'd go with having a separate CMake project that uses the parser for a known source file, and a Python script that first configures the project, and then runs |
Fix regex that requires two string arguments in the form of
TEST_CASE("a", "b") resulting in not finding TEST_CASE("a") entries.
See https://regex101.com/r/JygOND/1
Fixes: catchorg#2055
975d25c to
ff234db
Compare
|
updated the regex to cover the template cases https://regex101.com/r/JygOND/1 |
|
Okay, looks fine. However, I can't help but think of the regex, two problems saying. 😃 |
|
I just noticed that you target For v2 branch target Don't worry about the already merged PR, I'll cherry-pick it into the right branch later. |
|
changed it, thanks for the heads up |
Description
Fix regex that requires two string arguments in the form of
TEST_CASE("a", "b") resulting in not finding TEST_CASE("a") entries.
See regex: https://regex101.com/r/rQe6Jd/1
GitHub Issues
Fixes: #2055