From 5e879b7c988aad5ba6072973ade03d7cb4426f96 Mon Sep 17 00:00:00 2001
From: Colin Hogben <curl@pythontech.co.uk>
Date: Wed, 4 Jan 2012 11:18:42 +0000
Subject: [PATCH 1/3] Add two tests for telnet: URLs

Add simple telnet tests which (ab)use the http server.
The second test demonstrates an input file handling bug.
---
 tests/data/Makefile.am |    1 +
 tests/data/test1322    |   39 +++++++++++++++++++++++++++++++++++++++
 tests/data/test1323    |   43 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 83 insertions(+), 0 deletions(-)
 create mode 100644 tests/data/test1322
 create mode 100644 tests/data/test1323

diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index f589494..39a589e 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -82,6 +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 \
+test1322 test1323 \
 test2000 test2001 test2002 test2003 test2004
 
 EXTRA_DIST = $(TESTCASES) DISABLED
diff --git a/tests/data/test1322 b/tests/data/test1322
new file mode 100644
index 0000000..8391c42
--- /dev/null
+++ b/tests/data/test1322
@@ -0,0 +1,39 @@
+<testcase>
+<info>
+<keywords>
+TELNET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+TELNET to HTTP server
+ </name>
+<stdin>
+GET /we/want/1322 HTTP/1.0
+
+</stdin>
+ <command>
+telnet://%HOSTIP:%HTTPPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /we/want/1322 HTTP/1.0
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1323 b/tests/data/test1323
new file mode 100644
index 0000000..0284fec
--- /dev/null
+++ b/tests/data/test1323
@@ -0,0 +1,43 @@
+<testcase>
+<info>
+<keywords>
+TELNET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+TELNET check for bogus file handling in curl <= 7.23.1
+ </name>
+<stdin>
+GET /ignore/for/1323 HTTP/1.0
+
+</stdin>
+<file name="log/1323.txt">
+GET /we/want/1323 HTTP/1.0
+
+</file>
+ <command option="no-output">
+telnet://%HOSTIP:%HTTPPORT -T log/1323.txt
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /we/want/1323 HTTP/1.0
+
+</protocol>
+</verify>
+</testcase>
-- 
1.7.0.4

