summaryrefslogtreecommitdiff
path: root/test/test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-04-14 18:18:33 +0200
committerCarl Hetherington <cth@carlh.net>2024-04-15 10:59:34 +0200
commit1797b2b443168101cdd7250a51d75dfdd390b389 (patch)
tree51d656f467f31cf57652e7be2f25c03607045fae /test/test.cc
parent98199b85dfb35a5de045b2c675d4a1bdccd83cf5 (diff)
Improve error reporting for _replace tests and check everything about the notes (not just the codes).
Diffstat (limited to 'test/test.cc')
-rw-r--r--test/test.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test.cc b/test/test.cc
index 497120d4..bf0e9b03 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -567,7 +567,11 @@ Editor::Editor(boost::filesystem::path path)
Editor::~Editor()
{
- auto f = fopen(_path.string().c_str(), "w");
+ /* Open this binary so that text files are re-written with Unix endings even on Windows,
+ * so that if we subsequently get hashes of edited files the hashes are the same on
+ * all platforms.
+ */
+ auto f = fopen(_path.string().c_str(), "wb");
BOOST_REQUIRE (f);
fwrite (_content.c_str(), _content.length(), 1, f);
fclose (f);