Skip to content

Commit

Permalink
test for issue 76
Browse files Browse the repository at this point in the history
  • Loading branch information
Lodewijk Vöge committed May 13, 2019
1 parent 50b4f00 commit c006eeb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/file_descriptor_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,24 @@ void file_descriptor_test()
file.close();
BOOST_CHECK(!file.is_open());
}

#ifdef _WIN64
{
temp_file temp;
file_descriptor_sink file(temp.name(), BOOST_IOS::trunc);
std::streamsize len = static_cast<std::streamsize>(4ULL * 1024 * 1024 * 1024 + 1);
std::unique_ptr<char[]> buf(new char[len]);
memset(&buf[0], 0, len);
std::streamsize written = file.write(&buf[0], len);
std::streamsize pos = file.seek(0, BOOST_IOS::cur);
BOOST_CHECK_MESSAGE(
pos == written,
"silent short write"
);
file.close();
BOOST_CHECK(!file.is_open());
}
#endif

{
temp_file temp;
Expand Down

0 comments on commit c006eeb

Please sign in to comment.