aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/README3
-rw-r--r--tests/data/DISABLED2
-rw-r--r--tests/data/Makefile.am6
-rw-r--r--tests/data/test200060
-rw-r--r--tests/data/test200184
-rw-r--r--tests/data/test512
6 files changed, 152 insertions, 5 deletions
diff --git a/tests/README b/tests/README
index 0b21a6497..592e7cd73 100644
--- a/tests/README
+++ b/tests/README
@@ -128,7 +128,8 @@ TEST CASE NUMBERS
500 - 599 libcurl source code tests, not using the curl command tool
600 - 699 SCP/SFTP
700 - 799 SOCKS4 (even numbers) and SOCK5 (odd numbers)
- 1000 - x miscellaneous*
+ 1000 - 1999 miscellaneous*
+ 2000 - x multiple sequential protocols per test case*
Since 30-apr-2003, there's nothing in the system that requires us to keep
within these number series, and those sections marked with * actually
diff --git a/tests/data/DISABLED b/tests/data/DISABLED
index 95953eab3..a9a056a9c 100644
--- a/tests/data/DISABLED
+++ b/tests/data/DISABLED
@@ -4,3 +4,5 @@
# per line.
# Lines starting with '#' letters are treated as comments.
#1009
+2000
+2001
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index a63206785..3cb6b2a4d 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -45,13 +45,13 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
test706 test707 test350 test351 test352 test353 test289 test540 test354 \
test231 test1000 test1001 test1002 test1003 test1004 test1005 test1006 \
test615 test1007 test541 test1010 test1011 test1012 test542 test543 \
- test536 test1008 test1009
+ test536 test1008 test1009 test2000 test2001
filecheck:
@mkdir test-place; \
- cp test[0-9]* test-place/; \
+ cp "$(top_srcdir)"/tests/data/test[0-9]* test-place/; \
for f in $(EXTRA_DIST); do \
- if test -f $$f; then \
+ if test -f "$(top_srcdir)/tests/data/$$f"; then \
rm -f test-place/$$f; \
else \
echo "$$f is listed but missing!"; \
diff --git a/tests/data/test2000 b/tests/data/test2000
new file mode 100644
index 000000000..ff679c50d
--- /dev/null
+++ b/tests/data/test2000
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+FILE
+multiprotocol
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+data
+ to
+ see
+that FTP
+works
+ so does it?
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+file
+</server>
+ <name>
+FTP RETR followed by FILE
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/2000 file://localhost/%PWD/log/test2000.txt
+</command>
+<file name="log/test2000.txt">
+foo
+ bar
+bar
+ foo
+moo
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+TYPE I
+SIZE 2000
+RETR 2000
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2001 b/tests/data/test2001
new file mode 100644
index 000000000..c468ac29f
--- /dev/null
+++ b/tests/data/test2001
@@ -0,0 +1,84 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+FTP
+PASV
+FILE
+multiprotocol
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data1>
+<data2>
+data
+ to
+ see
+that FTP
+works
+ so does it?
+</data2>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+ftp
+file
+</server>
+ <name>
+HTTP GET followed by FTP RETR followed by FILE
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/20010001 ftp://%HOSTIP:%FTPPORT/20010002 file://localhost/%PWD/log/test2001.txt
+</command>
+<file name="log/test2001.txt">
+foo
+ bar
+bar
+ foo
+moo
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20010001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+TYPE I
+SIZE 20010002
+RETR 20010002
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test51 b/tests/data/test51
index f1973008a..b58c3570e 100644
--- a/tests/data/test51
+++ b/tests/data/test51
@@ -46,7 +46,7 @@ body
http
</server>
<name>
-HTTP follow redirect with exessive ../
+HTTP follow redirect with excessive ../
</name>
<command>
http://%HOSTIP:%HTTPPORT/we/are/all/twits/51 -L