curl-curl/tests/data/test1043
Viktor Szakats 904e7ecb66
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
2025-11-06 20:45:45 +01:00

83 lines
1.3 KiB
Plaintext

<testcase>
<info>
<keywords>
HTTP
HTTP GET
Resume
</keywords>
</info>
# Server-side
<reply>
<data crlf="headers">
HTTP/1.1 206 Partial Content
Date: Mon, 13 Nov 2007 13:41:09 GMT
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
Accept-Ranges: bytes
Content-Length: 60
Content-Range: bytes 40-99/100
012345678
012345678
012345678
012345678
012345678
012345678
</data>
# The file data that exists at the start of the test must be included in
# the verification.
<datacheck>
012345678
012345678
012345678
012345678
HTTP/1.1 206 Partial Content%CR
Date: Mon, 13 Nov 2007 13:41:09 GMT%CR
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT%CR
Accept-Ranges: bytes%CR
Content-Length: 60%CR
Content-Range: bytes 40-99/100%CR
%CR
012345678
012345678
012345678
012345678
012345678
012345678
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<name>
HTTP GET with resume from end of file
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -C -
</command>
<file name="%LOGDIR/curl%TESTNUMBER.out">
012345678
012345678
012345678
012345678
</file>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="headers">
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Range: bytes=40-
User-Agent: curl/%VERSION
Accept: */*
</protocol>
</verify>
</testcase>