Make test robust against differences in line endings

git on Windows can change line endings on checkout, which was leading to
a test failure.
Merge pull request #5866 from takluyver/test-crlf-insensitive

Make test robust against differences in line endings