diff --git a/src/CppUTest/JUnitTestOutput.cpp b/src/CppUTest/JUnitTestOutput.cpp
index bc3f6ed27..bf2dd9e38 100644
--- a/src/CppUTest/JUnitTestOutput.cpp
+++ b/src/CppUTest/JUnitTestOutput.cpp
@@ -240,7 +240,7 @@ void JUnitTestOutput::writeFileEnding()
{
writeToFile(""); writeToFile(impl_->stdOutput_); writeToFile("\n");
writeToFile("\n");
- writeToFile("");
+ writeToFile("\n");
}
void JUnitTestOutput::writeTestGroupToFile()
diff --git a/tests/CppUTest/JUnitOutputTest.cpp b/tests/CppUTest/JUnitOutputTest.cpp
index 3f8796a3e..3a984d7fe 100644
--- a/tests/CppUTest/JUnitOutputTest.cpp
+++ b/tests/CppUTest/JUnitOutputTest.cpp
@@ -383,7 +383,7 @@ TEST(JUnitOutputTest, withOneTestGroupAndOneTestOutputsTestSuiteStartAndEndBlock
outputFile = fileSystem.file("cpputest_groupname.xml");
STRCMP_EQUAL("\n", outputFile->line(2));
- STRCMP_EQUAL("", outputFile->lineFromTheBack(1));
+ STRCMP_EQUAL("\n", outputFile->lineFromTheBack(1));
}
TEST(JUnitOutputTest, withOneTestGroupAndOneTestFileShouldContainAnEmptyPropertiesBlock)