From: David Cook Date: Tue, 4 May 2021 00:29:40 +0000 (-0500) Subject: tests: ignore case of chunked hex numbers in tests X-Git-Tag: curl-7_77_0~94 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=70cf50fb4aa5e55ca2e732716a4f455d39192088;p=thirdparty%2Fcurl.git tests: ignore case of chunked hex numbers in tests 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 --- diff --git a/tests/data/test1072 b/tests/data/test1072 index f9fb730445..c0d4c18d4a 100644 --- a/tests/data/test1072 +++ b/tests/data/test1072 @@ -63,7 +63,11 @@ Accept: */* Transfer-Encoding: chunked Expect: 100-continue +%if hyper +7A +%else 7a +%endif This is data we upload with PUT it comes from stdin so MUST be sent with chunked encoding diff --git a/tests/data/test1073 b/tests/data/test1073 index 775c087986..3f6d703178 100644 --- a/tests/data/test1073 +++ b/tests/data/test1073 @@ -57,7 +57,11 @@ Accept: */* Transfer-Encoding: chunked Expect: 100-continue +%if hyper +7A +%else 7a +%endif This is data we upload with PUT it comes from stdin so MUST be sent with chunked encoding diff --git a/tests/data/test1591 b/tests/data/test1591 index 738696db1c..4bc02dd130 100644 --- a/tests/data/test1591 +++ b/tests/data/test1591 @@ -48,7 +48,11 @@ Transfer-Encoding: chunked Trailer: my-super-awesome-trailer, my-other-awesome-trailer Expect: 100-continue +%if hyper +E +%else e +%endif Hello Cloud! 0 diff --git a/tests/data/test218 b/tests/data/test218 index 40c68857f1..dc71442e87 100644 --- a/tests/data/test218 +++ b/tests/data/test218 @@ -47,7 +47,11 @@ Accept: */* Transfer-Encoding: chunked Expect: 100-continue +%if hyper +1E +%else 1e +%endif just some tiny teeny contents 0 diff --git a/tests/data/test510 b/tests/data/test510 index 415bbae27f..b673fa11b7 100644 --- a/tests/data/test510 +++ b/tests/data/test510 @@ -56,7 +56,11 @@ one two 5 three +%if hyper +1D +%else 1d +%endif and a final longer crap: four 0 diff --git a/tests/data/test565 b/tests/data/test565 index 37f70c932f..92a7a702b2 100644 --- a/tests/data/test565 +++ b/tests/data/test565 @@ -100,7 +100,11 @@ one two 5 three +%if hyper +1D +%else 1d +%endif and a final longer crap: four 0 diff --git a/tests/data/test645 b/tests/data/test645 index 10b6bef165..d5ce825bb8 100644 --- a/tests/data/test645 +++ b/tests/data/test645 @@ -108,7 +108,11 @@ y 1 +%if hyper +19A +%else 19a +%endif ------------------------------ Content-Disposition: form-data; name="filename" @@ -169,7 +173,11 @@ y 1 +%if hyper +19A +%else 19a +%endif ------------------------------ Content-Disposition: form-data; name="filename" diff --git a/tests/data/test650 b/tests/data/test650 index 7045d3626f..0e4c5d3c29 100644 --- a/tests/data/test650 +++ b/tests/data/test650 @@ -90,7 +90,11 @@ Content-Disposition: attachment; filename="test%TESTNUMBER.filedata" Content-Type: text/whatever +%if hyper +A5 +%else a5 +%endif This is data from a file. ------------------------------ @@ -98,7 +102,11 @@ Content-Disposition: attachment; filename="test%TESTNUMBER.filedata" Content-Type: text/whatever +%if hyper +AF +%else af +%endif This is data from a file. -------------------------------- @@ -107,7 +115,11 @@ This is data from a file. Content-Disposition: form-data; name="filecontents" +%if hyper +10F +%else 10f +%endif This is data from a file. ------------------------------ diff --git a/tests/data/test654 b/tests/data/test654 index 4de65d07ba..d8da0da1da 100644 --- a/tests/data/test654 +++ b/tests/data/test654 @@ -81,7 +81,11 @@ Transfer-Encoding: chunked Content-Type: multipart/form-data; boundary=---------------------------- Expect: 100-continue +%if hyper +1AF +%else 1af +%endif ------------------------------ Content-Disposition: form-data; name="greeting" Content-Type: application/X-Greeting diff --git a/tests/data/test667 b/tests/data/test667 index 8ae4fd597f..e54e15b0e0 100644 --- a/tests/data/test667 +++ b/tests/data/test667 @@ -66,7 +66,11 @@ Transfer-Encoding: chunked Content-Type: multipart/form-data; boundary=---------------------------- Expect: 100-continue +%if hyper +7F +%else 7f +%endif ------------------------------ Content-Disposition: form-data; name="field" Content-Transfer-Encoding: base64 diff --git a/tests/data/test668 b/tests/data/test668 index dfb9347e81..0606e37071 100644 --- a/tests/data/test668 +++ b/tests/data/test668 @@ -69,7 +69,11 @@ Transfer-Encoding: chunked Content-Type: multipart/form-data; boundary=---------------------------- Expect: 100-continue +%if hyper +C1 +%else c1 +%endif ------------------------------ Content-Disposition: form-data; name="field1"