]> granicus.if.org Git - curl/commitdiff
Add two tests for telnet: URLs
authorColin Hogben <curl@pythontech.co.uk>
Wed, 18 Jan 2012 21:19:57 +0000 (22:19 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 18 Jan 2012 21:20:33 +0000 (22:20 +0100)
Add simple telnet tests which (ab)use the http server.
The second test checks for an input file handling bug.

tests/data/Makefile.am
tests/data/test1326 [new file with mode: 0644]
tests/data/test1327 [new file with mode: 0644]

index 00c28759f605575269343f6cb28ccae0d5a361fc..85a6e4b2f61c2e22b8372bf5327e000cd53b50d2 100644 (file)
@@ -82,7 +82,7 @@ test1220 \
 test1300 test1301 test1302 test1303 test1304 test1305  \
 test1306 test1307 test1308 test1309 test1310 test1311 test1312 test1313 \
 test1314 test1315 test1316 test1317 test1318 test1319 test1320 test1321 \
-test1325 \
+test1325 test1326 test1327 \
 test2000 test2001 test2002 test2003 test2004
 
 EXTRA_DIST = $(TESTCASES) DISABLED
diff --git a/tests/data/test1326 b/tests/data/test1326
new file mode 100644 (file)
index 0000000..bb0cbac
--- /dev/null
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+TELNET
+UPLOAD
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 swsclose
+
+moo
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+telnet
+</features>
+ <name>
+TELNET to HTTP server
+ </name>
+<stdin>
+GET /we/want/1326 HTTP/1.0\r
+\r
+</stdin>
+ <command>
+telnet://%HOSTIP:%HTTPPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /we/want/1326 HTTP/1.0\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1327 b/tests/data/test1327
new file mode 100644 (file)
index 0000000..a6e3d4f
--- /dev/null
@@ -0,0 +1,47 @@
+<testcase>
+<info>
+<keywords>
+TELNET
+UPLOAD
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+telnet
+</features>
+ <name>
+TELNET check of upload with stdout redirected
+ </name>
+<stdin>
+GET /ignore/for/1327 HTTP/1.0\r
+\r
+</stdin>
+<file name="log/1327.txt">
+GET /we/want/1327 HTTP/1.0\r
+\r
+</file>
+ <command option="no-output">
+telnet://%HOSTIP:%HTTPPORT -T log/1327.txt
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /we/want/1327 HTTP/1.0\r
+\r
+</protocol>
+</verify>
+</testcase>