RFR: Ignore line ending differences in most tests, to compensate for autocrlf
Jorn Vernee via github.com
duke at openjdk.java.net
Mon Aug 26 09:43:25 UTC 2019
A PR that was recently integrated (https://github.com/openjdk/skara/commit/9c156f5c5b4db8d8bd239b34e4c3f263df2af23a) changed some of the `RepositoryTest`s to expect Windows line endings when testing on Windows.
But, Git has a configuration, called `core.autocrlf` that automatically converts line endings from Windows to Unix ones. If this is enabled the tests will fail, since they expect Windows line endings when there are none (see also https://github.com/openjdk/skara/commit/9c156f5c5b4db8d8bd239b34e4c3f263df2af23a#commitcomment-34819850)
This PR changes `RepositoryTest` once more, to ignore line endings when comparing lines in `assertLinesEquals`, and instead adds a separate test that checks that lines endings are being tracked when `core.autocrlf` is disabled (and in all cases for HG).
`vcs` tests now pass with both `core.autocrlf` enabled and disabled.
----------------
Commits:
- 127d0a5e: Ignore line ending differences in assertLinesEquals, and test that we can track line ending differences separately.
Pull request:
https://git.openjdk.java.net/skara/pull/83
Webrev:
https://webrevs.openjdk.java.net/skara/83/webrev.00
Patch:
https://git.openjdk.java.net/skara/pull/83.diff
Fetch command:
git fetch https://git.openjdk.java.net/skara pull/83/head:pull/83
More information about the skara-dev
mailing list