-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix REXML::Formatters::Pretty#write_document
## Why? Fix REXML::Formatters::Pretty#write_document, which implicitly assumes that the XML file ends with a newline. If the XML file does not end with a newline, a space is added to the end of the first line. ``` Failure: test_indent(REXMLTests::TestDocument::WriteTest::ArgumentsTest) /Users/naitoh/ghq/github.com/naitoh/rexml/test/test_document.rb:270:in `test_indent' 267: output = "" 268: indent = 2 269: @document.write(output, indent) => 270: assert_equal(<<-EOX.chomp, output) 271: <?xml version='1.0' encoding='UTF-8'?> 272: <message> 273: Hello world! <"<?xml version='1.0' encoding='UTF-8'?>\n" + "<message>\n" + " Hello world!\n" + "</message>"> expected but was <"<?xml version='1.0' encoding='UTF-8'?> \n" + "<message>\n" + " Hello world!\n" + "</message>"> diff: ? <?xml version='1.0' encoding='UTF-8'?> <message> Hello world! </message> ```
- Loading branch information
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters