RFR: Ignore line ending differences in most tests, to compensate for autocrlf
Erik Duveblad via github.com
duke at openjdk.java.net
Mon Aug 26 09:55:29 UTC 2019
On Mon, 26 Aug 2019 09:43:25 GMT, Jorn Vernee via github.com <duke at openjdk.java.net> wrote:
> 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.
> - 127d0a5e: Ignore line ending differences in assertLinesEquals, and test that we can track line ending differences separately.
> Pull request:
> Fetch command:
> git fetch https://git.openjdk.java.net/skara pull/83/head:pull/83
This PR has been reviewed by Erik Duveblad via github.com - changes are approved. Review comment:
Looks good, thanks Jorn for fixing this!
More information about the skara-dev