You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the test suite on Windows, XMLTest.testIndentComplicatedJsonObjectWithArrayAndWithConfig fails due to differences in the newline character being used in the expected and actual XMLs being compared - differences that are no functionally interesting.
The test properly canonized the newline character in the actual string produced by calling XML.toString, but fails to do so for the expected string that was read from a file. Since this file was not produced on a Windows machine, it won't contain the linebreaks expected when the test is run on Windows.
The text was updated successfully, but these errors were encountered:
mureinik
added a commit
to mureinik/JSON-java
that referenced
this issue
Oct 5, 2023
XMLTest.testIndentComplicatedJsonObjectWithArrayAndWithConfig fails
when run on Windows due to mismatching linebreaks (that aren't
important for the test's functionality) between the actual and
expected strings.
For the actual strings, linebreaks are canonized to the platform's
native linebreak using `replaceAll("\\n|\\r\\n",
System.getProperty("line.separator")`. However, the expected result is
read from a file, and is left with the linebreaks that were originally
used to create it.
The solution is to perform the same canonization on both strings.
Closesstleary#781
When running the test suite on Windows, XMLTest.testIndentComplicatedJsonObjectWithArrayAndWithConfig fails due to differences in the newline character being used in the expected and actual XMLs being compared - differences that are no functionally interesting.
The test properly canonized the newline character in the actual string produced by calling
XML.toString
, but fails to do so for the expected string that was read from a file. Since this file was not produced on a Windows machine, it won't contain the linebreaks expected when the test is run on Windows.The text was updated successfully, but these errors were encountered: