Catch2
Catch2 copied to clipboard
catch_discover_tests fails if test names contain an unterminated [
Describe the bug For a file with two tests: "Test1[" and "Test2", catch_discover_tests produces the following:
$ ctest
Test project /home/username/test_ctest/build
Start 1: Test1[;Test2;
1/1 Test #1: Test1[;Test2; .................... Passed 0.00 sec
Expected behavior If "Test1[" is renamed to "Test1", it works correctly:
$ ctest
Test project /home/username/test_ctest/build
Start 1: Test1
1/2 Test #1: Test1 ............................ Passed 0.00 sec
Start 2: Test2
2/2 Test #2: Test2 ............................ Passed 0.00 sec
Reproduction steps
Minimal test to reproduce: test_ctest.zip
Platform information:
- Catch version: v2.13.9
Additional context
From https://cmake.org/cmake/help/v3.0/manual/cmake-language.7.html#lists:
a string is divided into list elements by splitting on ; characters not following an unequal number of [ and ] characters