Make printing test changes platform-independent
Two of the tickets included in 1.10.2 had additions to printing related tests: and CLJ-1445.
Those changes did not properly take into account platform-dependent line endings in expected test output. The attached patch updates those tests to match other existing tests in being platform independent.
Thanks to David Miller for the heads up pointing this out!
Screened By: Fogus, v2 by Alex
I think that's the right guess - I did pick a number there that was trying to get meta on its own line - this all plays with the miser-width and that stuff so it's kind of fiddly.
When the expression containing r is pprint’ed on Linux and macOS, it puts all elements on the same line, without line breaks. When that expression is pprint’ed on Windows, it breaks all elements across 25 lines, and thus the test fails. With (range 24), all 3 platforms put all of the elements on the same line.
Why does Windows behave differently than the other platforms? That I have not dug into to discover fully. I believe all of the *print- … Vars have the same values on all platforms, so it isn’t that. My best guess is that the \r\n line separator on Windows might be causing pprint to count the \r as 1 character wider per line, but that is only a guess at this point.
why did you change the size of the ranges in test-print-meta?
I tried mvn clean ; mvn test on a Windows 10 machine using AdoptOpenJDK11 and the patch in clj-2602.patch, but it still failed 2 tests.
With the attached patch clj-2602-fix-v2.patch, all tests passed on that platform.