2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-13 00:12:11 +00:00

Corrected a bug in the Boost Build testing framework causing it to read file content with an additional newline character at the end when it already had one there instead of when it was missing.

[SVN r78968]
This commit is contained in:
Jurko Gospodnetić
2012-06-16 02:29:36 +00:00
parent ede5a51520
commit cb7f8671ab

View File

@@ -568,7 +568,7 @@ class Tester(TestCmd.TestCmd):
f = open(self.glob_file(name), "rb")
lines = f.readlines()
result = string.join(map(string.rstrip, lines), "\n")
if lines and lines[-1][-1] == '\n':
if lines and lines[-1][-1] != '\n':
return result + '\n'
else:
return result