File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ TEST_CASE("_cmd literal + string chaining")
6060 CHECK_EQ (errc, 0 );
6161}
6262
63- TEST_CASE (" bash-like redirection" )
63+ TEST_CASE (" bash-like redirection - stderr to stdout " )
6464{
6565 using namespace subprocess ::literals;
6666 std::string output;
@@ -70,6 +70,15 @@ TEST_CASE("bash-like redirection")
7070 REQUIRE (not output.empty ());
7171}
7272
73+ TEST_CASE (" bash-like redirection - stdout to stderr" )
74+ {
75+ using namespace subprocess ::literals;
76+ std::string output;
77+ int errc = (" echo abc" _cmd >= output > subprocess::err).run (std::nothrow);
78+ REQUIRE_EQ (errc, 0 );
79+ REQUIRE (output == " abc\n " );
80+ }
81+
7382TEST_CASE (" SIGPIPE handling for child processes" )
7483{
7584 using namespace subprocess ::literals;
You can’t perform that action at this time.
0 commit comments