mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-25 23:06:10 +01:00
Fix catch_discover_tests() - now should correctly find tests with commas | Related to #1327
This commit is contained in:
parent
e1307016f0
commit
0144ae9ad2
@ -51,12 +51,14 @@ string(REPLACE "\n" ";" output "${output}")
|
|||||||
# Parse output
|
# Parse output
|
||||||
foreach(line ${output})
|
foreach(line ${output})
|
||||||
set(test ${line})
|
set(test ${line})
|
||||||
|
# use escape commas to handle properly test cases with commans inside the name
|
||||||
|
string(REPLACE "," "\\," test_name ${test})
|
||||||
# ...and add to script
|
# ...and add to script
|
||||||
add_command(add_test
|
add_command(add_test
|
||||||
"${prefix}${test}${suffix}"
|
"${prefix}${test}${suffix}"
|
||||||
${TEST_EXECUTOR}
|
${TEST_EXECUTOR}
|
||||||
"${TEST_EXECUTABLE}"
|
"${TEST_EXECUTABLE}"
|
||||||
"${test}"
|
"${test_name}"
|
||||||
${extra_args}
|
${extra_args}
|
||||||
)
|
)
|
||||||
add_command(set_tests_properties
|
add_command(set_tests_properties
|
||||||
|
Loading…
Reference in New Issue
Block a user