Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test for issue 76 #78

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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