]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test1221: verify --url-query
authorDaniel Stenberg <daniel@haxx.se>
Fri, 4 Nov 2022 23:10:25 +0000 (00:10 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 8 Nov 2022 13:37:35 +0000 (14:37 +0100)
tests/data/Makefile.inc
tests/data/test1221 [new file with mode: 0644]

index cbb27973cb5c74fa6c382529b6b78d65e378abf6..30c2937d210f31085f919c3119ca6d88dfb324ed 100644 (file)
@@ -148,13 +148,12 @@ test1152 test1153 test1154 test1155 test1156 test1157 test1158 test1159 \
 test1160 test1161 test1162 test1163 test1164 test1165 test1166 test1167 \
 test1168 test1169 test1170 test1171 test1172 test1173 test1174 test1175 \
 test1176 test1177 test1178 test1179 test1180 test1181 test1182 test1183 \
-test1184 test1185 test1186 test1187 test1188 test1189 \
-\
-test1190 test1191 test1192 test1193 test1194 test1195 test1196 test1197 \
-test1198 test1199 \
-test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
-test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
-test1216 test1217 test1218 test1219 test1220                   test1223 \
+test1184 test1185 test1186 test1187 test1188 test1189 test1190 test1190 \
+test1191 test1192 test1193 test1194 test1195 test1196 test1197 test1198 \
+test1199 test1200 test1201 test1202 test1203 test1204 test1205 test1206 \
+test1207 test1208 test1209 test1210 test1211 test1212 test1213 test1214 \
+test1215 test1216 test1217 test1218 test1219 test1220 test1221 \
+test1223 \
 test1224 test1225 test1226 test1227 test1228 test1229 test1230 test1231 \
 test1232 test1233 test1234 test1235 test1236 test1237 test1238 test1239 \
 test1240 test1241 test1242 test1243 test1244 test1245 test1246 test1247 \
diff --git a/tests/data/test1221 b/tests/data/test1221
new file mode 100644 (file)
index 0000000..9382312
--- /dev/null
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+--data-urlencode
+--url-query
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 I am cool swsclose\r
+Server: Cool server/10.0\r
+Content-Length: 0\r
+\r
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--url-query with --data-urlencode
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --url-query "my name is moo[]" --url-query "yes=s i r" --url-query "v_alue@log/%TESTNUMBER.txt" --url-query @log/%TESTNUMBER.txt --url-query "+%3d%3d" --data-urlencode "start=once upon the time"
+</command>
+<file name="log/%TESTNUMBER.txt">
+content to _?!#$'|<>
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol nonewline="yes">
+POST /%TESTNUMBER?my+name+is+moo%5b%5d&yes=s+i+r&v_alue=content+to+_%3f%21%23%24%27%7c%3c%3e%0a&content+to+_%3f%21%23%24%27%7c%3c%3e%0a&%3d%3d HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+Content-Length: 24\r
+Content-Type: application/x-www-form-urlencoded\r
+\r
+start=once+upon+the+time
+</protocol>
+</verify>
+</testcase>