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

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-03-07 10:42:26 +0100
committerMartin Hořeňovský2022-03-07 10:59:27 +0100
commit06f74a0f8e505a08fff58e63beeb88569d8629d6 (patch)
tree0dd30937f0282013a89b0684096c8a7c4803b091 /tests/SelfTest/IntrospectiveTests/Stream.tests.cpp
parent61d0f7a9afb88c12f8931f80321e58f2cfbc62db (diff)
downloadcatch3-06f74a0f8e505a08fff58e63beeb88569d8629d6.tar.gz
Add %stderr and %stdout as recognized magic stream names
Diffstat (limited to 'tests/SelfTest/IntrospectiveTests/Stream.tests.cpp')
-rw-r--r--tests/SelfTest/IntrospectiveTests/Stream.tests.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp b/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp
index 8a3aad46..4ba08ee5 100644
--- a/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp
+++ b/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp
@@ -17,3 +17,12 @@ TEST_CASE( "Cout stream properly declares it writes to stdout", "[streams]" ) {
TEST_CASE( "Empty stream name opens cout stream", "[streams]" ) {
REQUIRE( Catch::makeStream( "" )->isStdout() );
}
+
+TEST_CASE( "stdout and stderr streams have %-starting name", "[streams]" ) {
+ REQUIRE( Catch::makeStream( "%stderr" )->isStdout() );
+ REQUIRE( Catch::makeStream( "%stdout" )->isStdout() );
+}
+
+TEST_CASE( "request an unknown %-starting stream fails", "[streams]" ) {
+ REQUIRE_THROWS( Catch::makeStream( "%somestream" ) );
+}