]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: ignore case of chunked hex numbers in tests
authorDavid Cook <divergentdave@gmail.com>
Tue, 4 May 2021 00:29:40 +0000 (19:29 -0500)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 4 May 2021 13:57:57 +0000 (15:57 +0200)
When hyper is used, it emits uppercase hexadecimal numbers for chunked
encoding lengths. Without hyper, lowercase hexadecimal numbers are used.
This change adds preprocessor statements to tests where this is an
issue, and adapts the fixtures to match.

Closes #6987

tests/data/test1072
tests/data/test1073
tests/data/test1591
tests/data/test218
tests/data/test510
tests/data/test565
tests/data/test645
tests/data/test650
tests/data/test654
tests/data/test667
tests/data/test668

index f9fb730445919c7ddc73121f30343ece6eba604f..c0d4c18d4a626271a09ee68fcf1a0e3020784ae0 100644 (file)
@@ -63,7 +63,11 @@ Accept: */*
 Transfer-Encoding: chunked\r
 Expect: 100-continue\r
 \r
+%if hyper
+7A\r
+%else
 7a\r
+%endif
 This is data we upload with PUT
 it comes from stdin so MUST be sent
 with chunked encoding
index 775c0879868270384569bf79a53d265b78cfeafc..3f6d70317829a8752d2a05c0696c72506ca0a392 100644 (file)
@@ -57,7 +57,11 @@ Accept: */*
 Transfer-Encoding: chunked\r
 Expect: 100-continue\r
 \r
+%if hyper
+7A\r
+%else
 7a\r
+%endif
 This is data we upload with PUT
 it comes from stdin so MUST be sent
 with chunked encoding
index 738696db1c7df9569726238e57660977809f6967..4bc02dd1307319d6c7a60b2a732f92800e9b9737 100644 (file)
@@ -48,7 +48,11 @@ Transfer-Encoding: chunked
 Trailer: my-super-awesome-trailer, my-other-awesome-trailer\r
 Expect: 100-continue\r
 \r
+%if hyper
+E\r
+%else
 e\r
+%endif
 Hello Cloud!\r
 \r
 0\r
index 40c68857f18683d46f86289349d399e49b206c4c..dc71442e87f2bdf5b4660eda2c020ccb195262db 100644 (file)
@@ -47,7 +47,11 @@ Accept: */*
 Transfer-Encoding: chunked\r
 Expect: 100-continue\r
 \r
+%if hyper
+1E\r
+%else
 1e\r
+%endif
 just some tiny teeny contents
 \r
 0\r
index 415bbae27fd06e5801c980c5d83273018051841b..b673fa11b76e7d0200328cd114d5f24286b07afe 100644 (file)
@@ -56,7 +56,11 @@ one
 two\r
 5\r
 three\r
+%if hyper
+1D\r
+%else
 1d\r
+%endif
 and a final longer crap: four\r
 0\r
 \r
index 37f70c932f965409bd6c9848a38520dffe924c63..92a7a702b2f13b7d0600cd3cfdf90160d35b672c 100644 (file)
@@ -100,7 +100,11 @@ one
 two\r
 5\r
 three\r
+%if hyper
+1D\r
+%else
 1d\r
+%endif
 and a final longer crap: four\r
 0\r
 \r
index 10b6bef165a2b1a30b7b91a555f7dd4a59392cca..d5ce825bb888a41b20c0015e6b42f4187924d320 100644 (file)
@@ -108,7 +108,11 @@ y
 1\r
 
 \r
+%if hyper
+19A\r
+%else
 19a\r
+%endif
 \r
 ------------------------------\r
 Content-Disposition: form-data; name="filename"\r
@@ -169,7 +173,11 @@ y
 1\r
 
 \r
+%if hyper
+19A\r
+%else
 19a\r
+%endif
 \r
 ------------------------------\r
 Content-Disposition: form-data; name="filename"\r
index 7045d3626ff645c9642cada5d946c20cee5f51eb..0e4c5d3c29d3959e9bd440d0c2086ae053799b01 100644 (file)
@@ -90,7 +90,11 @@ Content-Disposition: attachment; filename="test%TESTNUMBER.filedata"
 Content-Type: text/whatever\r
 \r
 \r
+%if hyper
+A5\r
+%else
 a5\r
+%endif
 This is data from a file.
 \r
 ------------------------------\r
@@ -98,7 +102,11 @@ Content-Disposition: attachment; filename="test%TESTNUMBER.filedata"
 Content-Type: text/whatever\r
 \r
 \r
+%if hyper
+AF\r
+%else
 af\r
+%endif
 This is data from a file.
 \r
 --------------------------------\r
@@ -107,7 +115,11 @@ This is data from a file.
 Content-Disposition: form-data; name="filecontents"\r
 \r
 \r
+%if hyper
+10F\r
+%else
 10f\r
+%endif
 This is data from a file.
 \r
 ------------------------------\r
index 4de65d07bac387283dcd99322030a04e79677ba9..d8da0da1da0a5cabd52cf5ee656dcaced8e5119e 100644 (file)
@@ -81,7 +81,11 @@ Transfer-Encoding: chunked
 Content-Type: multipart/form-data; boundary=----------------------------\r
 Expect: 100-continue\r
 \r
+%if hyper
+1AF\r
+%else
 1af\r
+%endif
 ------------------------------\r
 Content-Disposition: form-data; name="greeting"\r
 Content-Type: application/X-Greeting\r
index 8ae4fd597f9da4843b5ae2d8a908a77b5d152cb0..e54e15b0e09a0e818b21d9d36050d453fcd83f80 100644 (file)
@@ -66,7 +66,11 @@ Transfer-Encoding: chunked
 Content-Type: multipart/form-data; boundary=----------------------------\r
 Expect: 100-continue\r
 \r
+%if hyper
+7F\r
+%else
 7f\r
+%endif
 ------------------------------\r
 Content-Disposition: form-data; name="field"\r
 Content-Transfer-Encoding: base64\r
index dfb9347e81b78cb999cbc2f5feb523deefe1ad89..0606e370710c72ae0ce57d30aad345557a3b13dd 100644 (file)
@@ -69,7 +69,11 @@ Transfer-Encoding: chunked
 Content-Type: multipart/form-data; boundary=----------------------------\r
 Expect: 100-continue\r
 \r
+%if hyper
+C1\r
+%else
 c1\r
+%endif
 ------------------------------\r
 Content-Disposition: form-data; name="field1"\r
 \r