summaryrefslogtreecommitdiff
path: root/tests/data/test1404
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-03-12 17:38:26 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-03-19 15:57:21 +0100
commite2b4df7b5ed8ed86c900820fc4b2c30b9cb53f51 (patch)
tree3d15e2bf1fa76e0d951d64edeccca6b70636e0ed /tests/data/test1404
parent453ad35d15adf06bd1a141fb026214bc599b067f (diff)
downloadcurl-e2b4df7b5ed8ed86c900820fc4b2c30b9cb53f51.tar.gz
tests: use %TESTNUMBER instead of fixed number
This makes the tests easier to copy and relocate to other test numbers without having to update content. Closes #6738
Diffstat (limited to 'tests/data/test1404')
-rw-r--r--tests/data/test140422
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/data/test1404 b/tests/data/test1404
index 400fb65c2..49f66a1cc 100644
--- a/tests/data/test1404
+++ b/tests/data/test1404
@@ -33,10 +33,10 @@ http
SSL_CERT_FILE=
</setenv>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/1404 -F name=value -F 'file=@log/test1404.txt,log/test1404.txt;type=magic/content;encoder=8bit,log/test1404.txt;headers=X-testheader-1: header 1;headers=X-testheader-2: header 2' --libcurl log/test1404.c
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=value -F 'file=@log/test%TESTNUMBER.txt,log/test%TESTNUMBER.txt;type=magic/content;encoder=8bit,log/test%TESTNUMBER.txt;headers=X-testheader-1: header 1;headers=X-testheader-2: header 2' --libcurl log/test%TESTNUMBER.c
</command>
# We create this file before the command is invoked!
-<file name="log/test1404.txt">
+<file name="log/test%TESTNUMBER.txt">
dummy data
</file>
</client>
@@ -47,7 +47,7 @@ dummy data
-----+\w+
</strip>
<protocol>
-POST /we/want/1404 HTTP/1.1
+POST /we/want/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
@@ -62,20 +62,20 @@ value
Content-Disposition: form-data; name="file"
Content-Type: multipart/mixed; boundary=----------------------------aaaaaaaaaaaa
-Content-Disposition: attachment; filename="test1404.txt"
+Content-Disposition: attachment; filename="test%TESTNUMBER.txt"
Content-Type: text/plain
dummy data
------------------------------9ef8d6205763
-Content-Disposition: attachment; filename="test1404.txt"
+Content-Disposition: attachment; filename="test%TESTNUMBER.txt"
Content-Type: magic/content
Content-Transfer-Encoding: 8bit
dummy data
------------------------------9ef8d6205763
-Content-Disposition: attachment; filename="test1404.txt"
+Content-Disposition: attachment; filename="test%TESTNUMBER.txt"
Content-Type: text/plain
X-testheader-1: header 1
X-testheader-2: header 2
@@ -98,7 +98,7 @@ $_ = '' if /CURLOPT_INTERLEAVEDATA/
# CURL_DOES_CONVERSION generates an extra comment.
$_ = '' if /\/\* "value" \*\//
</stripfile>
-<file name="log/test1404.c" mode="text">
+<file name="log/test%TESTNUMBER.c" mode="text">
/********* Sample code generated by the curl command line tool **********
* All curl_easy_setopt() options are documented at:
* https://curl.se/libcurl/c/curl_easy_setopt.html
@@ -123,7 +123,7 @@ int main(int argc, char *argv[])
hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
- curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1404");
+ curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER");
mime1 = curl_mime_init(hnd);
part1 = curl_mime_addpart(mime1);
curl_mime_data(part1, "value", CURL_ZERO_TERMINATED);
@@ -131,13 +131,13 @@ int main(int argc, char *argv[])
part1 = curl_mime_addpart(mime1);
mime2 = curl_mime_init(hnd);
part2 = curl_mime_addpart(mime2);
- curl_mime_filedata(part2, "log/test1404.txt");
+ curl_mime_filedata(part2, "log/test%TESTNUMBER.txt");
part2 = curl_mime_addpart(mime2);
- curl_mime_filedata(part2, "log/test1404.txt");
+ curl_mime_filedata(part2, "log/test%TESTNUMBER.txt");
curl_mime_encoder(part2, "8bit");
curl_mime_type(part2, "magic/content");
part2 = curl_mime_addpart(mime2);
- curl_mime_filedata(part2, "log/test1404.txt");
+ curl_mime_filedata(part2, "log/test%TESTNUMBER.txt");
curl_mime_headers(part2, slist1, 1);
slist1 = NULL;
curl_mime_subparts(part1, mime2);