Skip to content

Commit

Permalink
Merge pull request cpputest#1155 from CFlix/junitOutputNewlineFix
Browse files Browse the repository at this point in the history
Add newline to end of JUnit output files.
  • Loading branch information
basvodde authored Apr 8, 2018
2 parents 27567cd + 843d169 commit 2edc6bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/CppUTest/JUnitTestOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void JUnitTestOutput::writeFileEnding()
{
writeToFile("<system-out>"); writeToFile(impl_->stdOutput_); writeToFile("</system-out>\n");
writeToFile("<system-err></system-err>\n");
writeToFile("</testsuite>");
writeToFile("</testsuite>\n");
}

void JUnitTestOutput::writeTestGroupToFile()
Expand Down
2 changes: 1 addition & 1 deletion tests/CppUTest/JUnitOutputTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ TEST(JUnitOutputTest, withOneTestGroupAndOneTestOutputsTestSuiteStartAndEndBlock

outputFile = fileSystem.file("cpputest_groupname.xml");
STRCMP_EQUAL("<testsuite errors=\"0\" failures=\"0\" hostname=\"localhost\" name=\"groupname\" tests=\"1\" time=\"0.000\" timestamp=\"1978-10-03T00:00:00\">\n", outputFile->line(2));
STRCMP_EQUAL("</testsuite>", outputFile->lineFromTheBack(1));
STRCMP_EQUAL("</testsuite>\n", outputFile->lineFromTheBack(1));
}

TEST(JUnitOutputTest, withOneTestGroupAndOneTestFileShouldContainAnEmptyPropertiesBlock)
Expand Down

0 comments on commit 2edc6bb

Please sign in to comment.