Tests: make them pass with CRLF checkouts #1422

merged 3 commits into from Apr 17, 2017


None yet

3 participants


There are currently 5 tests failing with CRLF line endings:

Tests 1221 and 1222:
They are failing on Linux because Bash (and other shells) errors out on CR characters with "\r: command not found" in otherwise empty lines, so force them to LF line endings.

Test 1035:
This test is failing (also on Windows) because data/test1035 expects the CURL_EXTERN lines to have LF line endings. Strip trailing CR in extern-scan.pl to fix this.

Tests 1022 and 1023:
They are failing because the CR is treated as part of the version number. Fix this by ignoring everything that comes after the version number.

Ref: #1344 (comment)

@MarcelRaad, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bagder, @dfandrich and @yangtse to be potential reviewers.

bagder approved these changes Apr 16, 2017 View changes
MarcelRaad added some commits Apr 14, 2017
@MarcelRaad MarcelRaad .gitattributes: force shell scripts to LF
Bash on Linux errors out on CR characters.
This makes tests 1221 and 1222 pass on Linux with a CRLF checkout.

Ref: curl#1344 (comment)
Closes curl#1422
@MarcelRaad MarcelRaad configure.ac: ignore CR after version numbers
Ignore everything after the version numbers in LIBCURL_VERSION and
LIBCURL_VERSION_NUM to ged rid of the extra CR character.
This makes tests 1022 and 1023 pass on Linux with a CRLF checkout.

Ref: curl#1344 (comment)
Closes curl#1422
@MarcelRaad MarcelRaad extern-scan.pl: strip trailing CR
This makes test 1135 pass with CRLF checkouts.

Ref: curl#1344 (comment)
Closes curl#1422
@MarcelRaad MarcelRaad merged commit c25aba1 into curl:master Apr 17, 2017

2 of 3 checks passed

continuous-integration/travis-ci/push The Travis CI build is in progress
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed


@MarcelRaad MarcelRaad deleted the MarcelRaad:tests_crlf branch Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment