Write test using binary, otherwise \n will become \r\n leading to double \r\r\n.

This commit is contained in:
Jacob Dufault 2018-01-03 17:30:17 -08:00
parent d9b9e5e227
commit 2a17f66792

View File

@ -450,7 +450,8 @@ void UpdateTestExpectation(const std::string& filename,
str.replace(it, expectation.size(), actual); str.replace(it, expectation.size(), actual);
// Write it back out. // Write it back out.
std::ofstream of(filename, std::ios::out | std::ios::trunc); std::ofstream of(filename,
std::ios::out | std::ios::trunc | std::ios::binary);
of.write(str.c_str(), str.size()); of.write(str.c_str(), str.size());
of.close(); of.close();
} }