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

@ -69,128 +69,128 @@ s/boundary=------------------------[A-Za-z0-9]*/boundary=-----------------------
# boundary string and since 5 of them are in the body contents, we see
# (5*12) == 60 bytes less
<protocol>
POST /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Transfer-Encoding: chunked
Content-Type: multipart/form-data; boundary=----------------------------
Expect: 100-continue
7c
------------------------------
Content-Disposition: form-data; name="sendfile"; filename="postit2.c"
d
1
u
1
m
1
m
1
y
1
POST /%TESTNUMBER HTTP/1.1%CR
Host: %HOSTIP:%HTTPPORT%CR
Accept: */*%CR
Transfer-Encoding: chunked%CR
Content-Type: multipart/form-data; boundary=----------------------------%CR
Expect: 100-continue%CR
%CR
7c%CR
------------------------------%CR
Content-Disposition: form-data; name="sendfile"; filename="postit2.c"%CR
%CR
d%CR
1%CR
u%CR
1%CR
m%CR
1%CR
m%CR
1%CR
y%CR
1%CR
6b
------------------------------
Content-Disposition: form-data; name="callbackdata"
1
d
1
u
1
m
1
m
1
y
1
%CR
6b%CR
%CR
------------------------------%CR
Content-Disposition: form-data; name="callbackdata"%CR
%CR
%CR
1%CR
d%CR
1%CR
u%CR
1%CR
m%CR
1%CR
m%CR
1%CR
y%CR
1%CR
1b2
------------------------------
Content-Disposition: form-data; name="filename"
postit2.c
------------------------------
Content-Disposition: form-data; name="submit"
send
------------------------------
Content-Disposition: form-data; name="somename"; filename="somefile.txt"
Content-Type: text/plain
blah blah
--------------------------------
0
POST /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Transfer-Encoding: chunked
Content-Type: multipart/form-data; boundary=----------------------------
Expect: 100-continue
8a
------------------------------
Content-Disposition: form-data; name="sendfile alternative"; filename="file name 2"
d
1
u
1
m
1
m
1
y
1
%CR
1b2%CR
%CR
------------------------------%CR
Content-Disposition: form-data; name="filename"%CR
%CR
postit2.c%CR
------------------------------%CR
Content-Disposition: form-data; name="submit"%CR
%CR
send%CR
------------------------------%CR
Content-Disposition: form-data; name="somename"; filename="somefile.txt"%CR
Content-Type: text/plain%CR
%CR
blah blah%CR
--------------------------------%CR
%CR
0%CR
%CR
POST /%TESTNUMBER HTTP/1.1%CR
Host: %HOSTIP:%HTTPPORT%CR
Accept: */*%CR
Transfer-Encoding: chunked%CR
Content-Type: multipart/form-data; boundary=----------------------------%CR
Expect: 100-continue%CR
%CR
8a%CR
------------------------------%CR
Content-Disposition: form-data; name="sendfile alternative"; filename="file name 2"%CR
%CR
d%CR
1%CR
u%CR
1%CR
m%CR
1%CR
m%CR
1%CR
y%CR
1%CR
6b
------------------------------
Content-Disposition: form-data; name="callbackdata"
1
d
1
u
1
m
1
m
1
y
1
%CR
6b%CR
%CR
------------------------------%CR
Content-Disposition: form-data; name="callbackdata"%CR
%CR
%CR
1%CR
d%CR
1%CR
u%CR
1%CR
m%CR
1%CR
m%CR
1%CR
y%CR
1%CR
1b2
------------------------------
Content-Disposition: form-data; name="filename"
postit2.c
------------------------------
Content-Disposition: form-data; name="submit"
send
------------------------------
Content-Disposition: form-data; name="somename"; filename="somefile.txt"
Content-Type: text/plain
blah blah
--------------------------------
0
%CR
1b2%CR
%CR
------------------------------%CR
Content-Disposition: form-data; name="filename"%CR
%CR
postit2.c%CR
------------------------------%CR
Content-Disposition: form-data; name="submit"%CR
%CR
send%CR
------------------------------%CR
Content-Disposition: form-data; name="somename"; filename="somefile.txt"%CR
Content-Type: text/plain%CR
%CR
blah blah%CR
--------------------------------%CR
%CR
0%CR
%CR
</protocol>
</verify>
</testcase>