From 38649d1362d233dace774a6738f9009c067b1bab Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Wed, 24 Oct 2007 19:40:07 +0000 Subject: [PATCH] Added test cases 2000 and 2001 which test multiple protocols using the same easy handle Fixed the filecheck: make target to work outside the source tree --- CHANGES | 8 ++++ tests/README | 3 +- tests/data/DISABLED | 2 + tests/data/Makefile.am | 6 +-- tests/data/test2000 | 60 ++++++++++++++++++++++++++++++ tests/data/test2001 | 84 ++++++++++++++++++++++++++++++++++++++++++ tests/data/test51 | 2 +- 7 files changed, 160 insertions(+), 5 deletions(-) create mode 100644 tests/data/test2000 create mode 100644 tests/data/test2001 diff --git a/CHANGES b/CHANGES index bbb25bc2c..a56faf6cd 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,14 @@ Changelog +Dan F (24 October 2007) +- Fixed the test FTP server to support the >10000 test number notation + +- Added test cases 2000 and 2001 which test multiple protocols using the + same easy handle + +- Fixed the filecheck: make target to work outside the source tree + Daniel S (24 October 2007) - Vladimir Lazarenko pointed out that we should do some 'mt' magic when building with VC8 to get the "manifest" embedded to make fine stand-alone 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 @@ + + + +FTP +PASV +FILE +multiprotocol + + + +# +# Server-side + + +data + to + see +that FTP +works + so does it? + + + +# +# Client-side + + +ftp +file + + +FTP RETR followed by FILE + + +ftp://%HOSTIP:%FTPPORT/2000 file://localhost/%PWD/log/test2000.txt + + +foo + bar +bar + foo +moo + + + +# +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +EPSV +TYPE I +SIZE 2000 +RETR 2000 +QUIT + + + 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 @@ + + + +HTTP +HTTP GET +FTP +PASV +FILE +multiprotocol + + + +# +# Server-side + + +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- + + +data + to + see +that FTP +works + so does it? + + + +# +# Client-side + + +http +ftp +file + + +HTTP GET followed by FTP RETR followed by FILE + + +http://%HOSTIP:%HTTPPORT/20010001 ftp://%HOSTIP:%FTPPORT/20010002 file://localhost/%PWD/log/test2001.txt + + +foo + bar +bar + foo +moo + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /20010001 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + +USER anonymous +PASS ftp@example.com +PWD +EPSV +TYPE I +SIZE 20010002 +RETR 20010002 +QUIT + + + 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 -HTTP follow redirect with exessive ../ +HTTP follow redirect with excessive ../ http://%HOSTIP:%HTTPPORT/we/are/all/twits/51 -L