mirror of
https://github.com/OldUnreal/curl.git
synced 2026-04-02 21:39:41 -07:00
testsuite: use binary output mode for custom curl test tools
Do not try to convert line-endings to CRLF on Windows by setting stdout to binary mode, just like the curl tool does if --ascii is not specified. This should prevent corrupted stdout line-ending output like CRCRLF. In order to make the previously naive text-aware tests work with binary mode on Windows, text-mode is disabled for them if it is not actually part of the test case and line-endings are corrected.
This commit is contained in:
@@ -24,7 +24,7 @@ http://%HOSTIP:%HTTPPORT/path/1508
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<file name="log/stdout1508" mode="text">
|
||||
<file name="log/stdout1508">
|
||||
We are done
|
||||
</file>
|
||||
</verify>
|
||||
|
||||
@@ -9,7 +9,7 @@ multi
|
||||
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
<data>
|
||||
Adding handle 0
|
||||
Handle 0 Completed with status 0
|
||||
Adding handle 1
|
||||
|
||||
@@ -9,7 +9,7 @@ multi
|
||||
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
<data>
|
||||
Adding handle 0
|
||||
Handle 0 Completed with status 0
|
||||
Adding handle 1
|
||||
|
||||
@@ -9,7 +9,7 @@ multi
|
||||
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
<data>
|
||||
Adding handle 0
|
||||
Handle 0 Completed with status 0
|
||||
Adding handle 1
|
||||
|
||||
@@ -9,7 +9,7 @@ multi
|
||||
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
<data>
|
||||
Adding handle 0
|
||||
Handle 0 Completed with status 0
|
||||
Adding handle 1
|
||||
|
||||
@@ -8,18 +8,18 @@ HTTP GET
|
||||
#
|
||||
# Server-side
|
||||
<reply name="1">
|
||||
<data mode="text">
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
||||
ETag: "21025-dc7-39462498"
|
||||
Accept-Ranges: bytes
|
||||
Content-Length: 6
|
||||
Connection: close
|
||||
Content-Type: text/html
|
||||
Funny-head: yesyes
|
||||
|
||||
<data>
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
||||
ETag: "21025-dc7-39462498"
|
||||
Accept-Ranges: bytes
|
||||
Content-Length: 6
|
||||
Connection: close
|
||||
Content-Type: text/html
|
||||
Funny-head: yesyes
|
||||
|
||||
-foo-
|
||||
</data>
|
||||
</reply>
|
||||
@@ -45,7 +45,7 @@ http://%HOSTIP:%HTTPPORT/500 log/ip500
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<file name="log/ip500" mode="text">
|
||||
<file name="log/ip500">
|
||||
IP: %HOSTIP
|
||||
</file>
|
||||
<protocol>
|
||||
|
||||
@@ -7,7 +7,7 @@ FILE
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
<data>
|
||||
foo
|
||||
bar swsclose
|
||||
bar
|
||||
|
||||
@@ -72,7 +72,7 @@ http://%HOSTIP:%HTTPPORT/506
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<stdout mode="text">
|
||||
<stdout>
|
||||
GLOBAL_INIT
|
||||
SHARE_INIT
|
||||
CURLSHOPT_LOCKFUNC
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake swsclose
|
||||
Connection: close
|
||||
Content-Type: text/html
|
||||
|
||||
<data>
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake swsclose
|
||||
Connection: close
|
||||
Content-Type: text/html
|
||||
|
||||
hello
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
@@ -28,7 +28,7 @@ nothing
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<stdout mode="text">
|
||||
<stdout>
|
||||
seen custom_calloc()
|
||||
seen custom_malloc()
|
||||
seen custom_realloc()
|
||||
|
||||
@@ -9,13 +9,13 @@ HTTP POST
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake swsclose
|
||||
Connection: close
|
||||
Content-Type: text/html
|
||||
|
||||
<data>
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake swsclose
|
||||
Connection: close
|
||||
Content-Type: text/html
|
||||
|
||||
hello
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
@@ -9,7 +9,7 @@ HTTP GET
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
<data>
|
||||
HTTP/1.1 200 OK swsclose
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: yes
|
||||
|
||||
@@ -8,18 +8,18 @@ HTTP HEAD
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
||||
ETag: "21025-dc7-39462498"
|
||||
Accept-Ranges: bytes
|
||||
Content-Length: 6
|
||||
Connection: close
|
||||
Content-Type: text/html
|
||||
Funny-head: yesyes
|
||||
|
||||
<data>
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
||||
ETag: "21025-dc7-39462498"
|
||||
Accept-Ranges: bytes
|
||||
Content-Length: 6
|
||||
Connection: close
|
||||
Content-Type: text/html
|
||||
Funny-head: yesyes
|
||||
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ HTTP POST
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
HTTP/1.1 200 OK swsclose
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 3
|
||||
|
||||
<data>
|
||||
HTTP/1.1 200 OK swsclose
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 3
|
||||
|
||||
OK
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
@@ -9,12 +9,12 @@ HTTP POST
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
HTTP/1.1 200 OK swsclose
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 3
|
||||
|
||||
<data>
|
||||
HTTP/1.1 200 OK swsclose
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 3
|
||||
|
||||
OK
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
@@ -25,7 +25,7 @@ nothing
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<stdout mode="text">
|
||||
<stdout>
|
||||
0: Sun, 06 Nov 1994 08:49:37 GMT => 784111777
|
||||
1: Sunday, 06-Nov-94 08:49:37 GMT => 784111777
|
||||
2: Sun Nov 6 08:49:37 1994 => 784111777
|
||||
|
||||
@@ -9,34 +9,34 @@ HTTP GET
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
HTTP/1.1 200 OK swsbounce
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 8
|
||||
|
||||
<data>
|
||||
HTTP/1.1 200 OK swsbounce
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 8
|
||||
|
||||
content
|
||||
</data>
|
||||
<data1>
|
||||
HTTP/1.1 200 OK swsclose
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 9
|
||||
|
||||
HTTP/1.1 200 OK swsclose
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 9
|
||||
|
||||
content2
|
||||
</data1>
|
||||
<datacheck>
|
||||
HTTP/1.1 200 OK swsbounce
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 8
|
||||
|
||||
HTTP/1.1 200 OK swsbounce
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 8
|
||||
|
||||
content
|
||||
HTTP/1.1 200 OK swsclose
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 9
|
||||
|
||||
HTTP/1.1 200 OK swsclose
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 9
|
||||
|
||||
content2
|
||||
</datacheck>
|
||||
</reply>
|
||||
|
||||
@@ -53,7 +53,7 @@ Host: %HOSTIP:%HTTPPORT
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
<stdout mode="text">
|
||||
<stdout>
|
||||
hello
|
||||
</stdout>
|
||||
</verify>
|
||||
|
||||
@@ -57,7 +57,7 @@ Accept: */*
|
||||
Proxy-Connection: Keep-Alive
|
||||
|
||||
</protocol>
|
||||
<stdout mode="text">
|
||||
<stdout>
|
||||
hello
|
||||
</stdout>
|
||||
</verify>
|
||||
|
||||
@@ -8,23 +8,23 @@ multi
|
||||
</info>
|
||||
|
||||
<reply>
|
||||
<data mode="text">
|
||||
HTTP/1.1 404 Badness
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
ETag: "21025-dc7-39462498"
|
||||
Content-Length: 6
|
||||
Content-Type: text/html
|
||||
Funny-head: yesyes
|
||||
|
||||
<data>
|
||||
HTTP/1.1 404 Badness
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
ETag: "21025-dc7-39462498"
|
||||
Content-Length: 6
|
||||
Content-Type: text/html
|
||||
Funny-head: yesyes
|
||||
|
||||
hejsan
|
||||
</data>
|
||||
<data1>
|
||||
HTTP/1.1 200 Fine
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Content-Length: 13
|
||||
Connection: close
|
||||
Content-Type: text/html
|
||||
|
||||
HTTP/1.1 200 Fine
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Content-Length: 13
|
||||
Connection: close
|
||||
Content-Type: text/html
|
||||
|
||||
fine content
|
||||
</data1>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user