【发布时间】:2021-09-06 08:50:42
【问题描述】:
我对 cmake ctest 有疑问。我正在检查完整字符串中的子字符串。但是遇到了找不到字符串的问题。如何指定只查找子字符串,而不是完整的字符串?
neg_message="App error: Error code=5"
set_tests_properties(test_app PROPERTIES
FAIL_REGULAR_EXPRESSION "${neg_message}")
App error: Error code=5, Index=1, Line number=1389, aborting...
1/1 Test #1: test_neg_app ..............***Failed Error regular expression found in output. Regex=[App error: Error code=5] 1.32 sec
【问题讨论】: