Test that PipeCapture clears capture buffer before it starts (#777973)

Initialise capture string with sacrificial text before each test.
Existing tests confirm this is cleared first by checking the captured
string matches the input string.

Bug 777973 - Segmentation fault on bad disk
This commit is contained in:
Mike Fleetwood 2017-05-25 07:08:14 +01:00 committed by Curtis Gedak
parent a233e30efe
commit 03c2be9b90
1 changed files with 2 additions and 1 deletions

View File

@ -142,7 +142,8 @@ std::string BinaryStringToPrint( size_t offset, const char * s, size_t len )
class PipeCaptureTest : public ::testing::Test
{
protected:
PipeCaptureTest() : eof_signalled( false ), update_signalled( 0U ) {};
PipeCaptureTest() : capturedstr( "text to be replaced" ),
eof_signalled( false ), update_signalled( 0U ) {};
virtual void SetUp();
virtual void TearDown();