Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-10-20 15:09:48 +0200
committerMartin Hořeňovský2020-10-20 15:09:48 +0200
commit923bcc5d6fc2bf0123d883f7d18a678ce63bbfe4 (patch)
tree6f653cfb05f33a902e9b0e9c740dc3f451861db1 /tests
parentb6a3e2e26b8afabd9a8a89a353662eda9b67097e (diff)
downloadcatch3-923bcc5d6fc2bf0123d883f7d18a678ce63bbfe4.tar.gz
Special case --list-tests --verbosity quiet
The new output (mostly) follows the old `--list-test-names-only` format, with the exception of no longer supporting line output for `--verbosity high`. Fixes #2051
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 3235c36b..13608bd7 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -99,6 +99,15 @@ set_tests_properties(List::Tests::Output PROPERTIES
PASS_REGULAR_EXPRESSION "[0-9]+ test cases"
FAIL_REGULAR_EXPRESSION "Hidden Test"
)
+# This should be equivalent to the old --list-test-names-only and be usable
+# with --input-file.
+add_test(NAME List::Tests::Quiet COMMAND $<TARGET_FILE:SelfTest> --list-tests --verbosity quiet)
+# Sadly we cannot ask for start-of-line and end-of-line in a ctest regex,
+# so we fail if we see space/tab at the start...
+set_tests_properties(List::Tests::Quiet PROPERTIES
+ PASS_REGULAR_EXPRESSION "\"#1905 -- test spec parser properly clears internal state between compound tests\"[\r\n]"
+ FAIL_REGULAR_EXPRESSION "[ \t]\"#1905 -- test spec parser properly clears internal state between compound tests\""
+)
add_test(NAME List::Tests::ExitCode COMMAND $<TARGET_FILE:SelfTest> --list-tests --verbosity high)
add_test(NAME List::Tests::XmlOutput COMMAND $<TARGET_FILE:SelfTest> --list-tests --verbosity high -r xml)
set_tests_properties(List::Tests::XmlOutput PROPERTIES