tests: replace remaining CR bytes with the new macro %CR

There is no more mixed-newline file in the repository after this patch.
Except for`.bat` and `.sln` files (4 in total), all files use LF
newlines.

Also:
- `spacecheck.pl`: drop mixed-EOL exception for test data.
- runtests: add option `-w` to check if test data has stray CR bytes in
  them.
- build: enable the option above in test targets, except the CI-specific
  one where `spacecheck.pl` does this job already.
- tested OK (with expected failures) in CI with stray CRs added.
- cmake: enable option `-a` for the `tests` target. To continue testing
  after a failed test.

Follow-up to 63e9721b63 #19313
Follow-up to 6cf3d7b1b1 #19318
Follow-up to 4d2a05d3fe #19284

Closes #19347
This commit is contained in:
Viktor Szakats 2025-11-03 21:38:35 +01:00
parent 672886f734
commit 904e7ecb66
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
123 changed files with 2045 additions and 2009 deletions

View file

@ -36,11 +36,11 @@ Server: test-server/fake
Proxy-Authenticate: Digest realm="many secrets", nonce="911"
Content-Length: 0
HTTP/1.1 200 A OK
Server: Microsoft-IIS/6.0
Content-Type: text/html; charset=iso-8859-1
Content-Length: 3
HTTP/1.1 200 A OK%CR
Server: Microsoft-IIS/6.0%CR
Content-Type: text/html; charset=iso-8859-1%CR
Content-Length: 3%CR
%CR
ok
</datacheck>
@ -78,59 +78,59 @@ bar
^(Content-Type: multipart/form-data;|------).*
</strip>
<protocol>
POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1
Host: remotehost:54321
User-Agent: curl/%VERSION
Accept: */*
Proxy-Connection: Keep-Alive
Expect: 100-continue
Content-Length: 433
Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
------------------------------7c633d5c27ce
Content-Disposition: form-data; name="name"
daniel
------------------------------7c633d5c27ce
Content-Disposition: form-data; name="tool"
curl
------------------------------7c633d5c27ce
Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"
Content-Type: text/plain
POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1%CR
Host: remotehost:54321%CR
User-Agent: curl/%VERSION%CR
Accept: */*%CR
Proxy-Connection: Keep-Alive%CR
Expect: 100-continue%CR
Content-Length: 433%CR
Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce%CR
%CR
------------------------------7c633d5c27ce%CR
Content-Disposition: form-data; name="name"%CR
%CR
daniel%CR
------------------------------7c633d5c27ce%CR
Content-Disposition: form-data; name="tool"%CR
%CR
curl%CR
------------------------------7c633d5c27ce%CR
Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"%CR
Content-Type: text/plain%CR
%CR
foo-
This is a moo-
bar
------------------------------7c633d5c27ce--
POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1
Host: remotehost:54321
Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/%TESTNUMBER", response="b479994d13e60f3aa192a67c5892ddc5"
User-Agent: curl/%VERSION
Accept: */*
Proxy-Connection: Keep-Alive
Expect: 100-continue
Content-Length: 433
Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
------------------------------7c633d5c27ce
Content-Disposition: form-data; name="name"
daniel
------------------------------7c633d5c27ce
Content-Disposition: form-data; name="tool"
curl
------------------------------7c633d5c27ce
Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"
Content-Type: text/plain
%CR
------------------------------7c633d5c27ce--%CR
POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1%CR
Host: remotehost:54321%CR
Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/%TESTNUMBER", response="b479994d13e60f3aa192a67c5892ddc5"%CR
User-Agent: curl/%VERSION%CR
Accept: */*%CR
Proxy-Connection: Keep-Alive%CR
Expect: 100-continue%CR
Content-Length: 433%CR
Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce%CR
%CR
------------------------------7c633d5c27ce%CR
Content-Disposition: form-data; name="name"%CR
%CR
daniel%CR
------------------------------7c633d5c27ce%CR
Content-Disposition: form-data; name="tool"%CR
%CR
curl%CR
------------------------------7c633d5c27ce%CR
Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"%CR
Content-Type: text/plain%CR
%CR
foo-
This is a moo-
bar
------------------------------7c633d5c27ce--
%CR
------------------------------7c633d5c27ce--%CR
</protocol>
</verify>
</testcase>