diff options
| author | Martin Hořeňovský | 2021-12-31 14:51:15 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-01-01 14:16:12 +0100 |
| commit | 93882f7fab9ef027bd49df781a1f542e1adb516e (patch) | |
| tree | 3fe56a668f491c4da6ba9757c4d1ffede3c3fd94 /tests | |
| parent | 4752545a69e46126f86b1bd54bc154fc54f37e2a (diff) | |
| download | catch3-93882f7fab9ef027bd49df781a1f542e1adb516e.tar.gz | |
Support '-' as output path for stdout
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/CMakeLists.txt | 20 |
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>) |