Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix XMLTest.testIndentComplicatedJsonObjectWithArrayAndWithConfig() for Windows - in the test #782

Merged
merged 2 commits into from
Oct 8, 2023

Commits on Oct 5, 2023

  1. Fix XMLTest on Windows

    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.
    
    Closes stleary#781
    mureinik committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    fe45fa9 View commit details
    Browse the repository at this point in the history
  2. Use System.lineSeparator()

    Use the built-in System.lineSeparator() instead of implementing it
    ourselves with System.getProperty("line.separator") in order to clean
    up the code and make it easier to maintain.
    mureinik committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    4c8cac2 View commit details
    Browse the repository at this point in the history