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

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-12-31 14:51:15 +0100
committerMartin Hořeňovský2022-01-01 14:16:12 +0100
commit93882f7fab9ef027bd49df781a1f542e1adb516e (patch)
tree3fe56a668f491c4da6ba9757c4d1ffede3c3fd94 /tests
parent4752545a69e46126f86b1bd54bc154fc54f37e2a (diff)
downloadcatch3-93882f7fab9ef027bd49df781a1f542e1adb516e.tar.gz
Support '-' as output path for stdout
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 5f0996e0..2e8d0a6b 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -451,6 +451,26 @@ set_tests_properties("MultiReporter::NonCapturingReportersPropagateStdout"
PASS_REGULAR_EXPRESSION "A string sent to stderr via clog"
)
+add_test(NAME "Outputs::DashAsOutLocationSendsOutputToStdout"
+ COMMAND
+ $<TARGET_FILE:SelfTest> "Factorials are computed"
+ --out=-
+)
+set_tests_properties("Outputs::DashAsOutLocationSendsOutputToStdout"
+ PROPERTIES
+ PASS_REGULAR_EXPRESSION "All tests passed \\(5 assertions in 1 test case\\)"
+)
+
+add_test(NAME "Reporters::DashAsLocationInReporterSpecSendsOutputToStdout"
+ COMMAND
+ $<TARGET_FILE:SelfTest> "Factorials are computed"
+ --reporter console::-
+)
+set_tests_properties("Reporters::DashAsLocationInReporterSpecSendsOutputToStdout"
+ PROPERTIES
+ PASS_REGULAR_EXPRESSION "All tests passed \\(5 assertions in 1 test case\\)"
+)
+
if (CATCH_USE_VALGRIND)
add_test(NAME ValgrindRunTests COMMAND valgrind --leak-check=full --error-exitcode=1 $<TARGET_FILE:SelfTest>)