Add tests for #1514

If the regression comes back, it will only be caught by approvals,
but that's better than nothing.
This commit is contained in:
Martin Hořeňovský 2019-03-02 21:22:41 +01:00
parent 7d2451f119
commit 28db5ed4c9
No known key found for this signature in database
GPG key ID: DE48307B8B0D381A
7 changed files with 83 additions and 14 deletions

View file

@ -19,6 +19,7 @@
#include <stdio.h>
#include <sstream>
#include <iostream>
///////////////////////////////////////////////////////////////////////////////
TEST_CASE
@ -426,3 +427,10 @@ TEST_CASE( "Bitfields can be captured (#1027)" ) {
REQUIRE( y.v == 0 );
REQUIRE( 0 == y.v );
}
TEST_CASE("#1514: stderr/stdout is not captured in tests aborted by an exception", "[output-capture][regression][.]") {
std::cout << "This would not be caught previously\n";
std::clog << "Nor would this\n";
// FAIL aborts the test by throwing a Catch exception
FAIL("1514");
}