I would like PASS_REGULAR_EXPRESSION
to also check stderr
. Is it possible? I tried the following:
add_test(NAME test COMMAND executable)
set_tests_properties(test PROPERTIES
WILL_FAIL true
PASS_REGULAR_EXPRESSION "I was printed to stderr"
)
but it doesn't work since PASS_REGULAR_EXPRESSION
checks only stdout
. I tried to redirect stderr
to stdout
with:
add_test(NAME test COMMAND executable 2>&1)
But it doesn't seem to work either.