summaryrefslogtreecommitdiff
path: root/tests/data/test1188
diff options
context:
space:
mode:
Diffstat (limited to 'tests/data/test1188')
-rw-r--r--tests/data/test118847
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/data/test1188 b/tests/data/test1188
new file mode 100644
index 000000000..d2e741e4d
--- /dev/null
+++ b/tests/data/test1188
@@ -0,0 +1,47 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--write-out
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Content-Length: 3
+Connection: close
+
+hi
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--write-out with %{onerror} and %{urlnum} to stderr
+ </name>
+<command>
+http://%HOSTIP:%NOLISTENPORT/we/want/our/1188 http://%HOSTIP:%HTTPPORT/we/want/our/1188 -w '%{onerror}%{stderr}%{urlnum} says %{exitcode} %{errormsg}\n' -s
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /we/want/our/1188 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol>
+<stderr mode="text">
+0 says 7 Failed to connect to %HOSTIP port %NOLISTENPORT: Connection refused
+</stderr>
+</verify>
+</testcase>