Add a test for wxFile::ReadAll() with an embedded NUL

See #16490.
This commit is contained in:
ARATA Mizuki 2016-02-19 10:46:26 +09:00 committed by Vadim Zeitlin
parent 204bc3c887
commit 54dfc341ce

View File

@ -116,6 +116,16 @@ void FileTestCase::DoRoundTripTest(const wxMBConv& conv)
wxString dataReadBack(buf, conv, len);
CPPUNIT_ASSERT_EQUAL( data, dataReadBack );
}
{
wxFile fin(tf.GetName(), wxFile::read);
CPPUNIT_ASSERT( fin.IsOpened() );
wxString dataReadBack;
CPPUNIT_ASSERT( fin.ReadAll(&dataReadBack, conv) );
CPPUNIT_ASSERT_EQUAL( data, dataReadBack );
}
}
#endif // wxUSE_UNICODE