Added test cases 2000 and 2001 which test multiple protocols using the
authorDan Fandrich <dan@coneharvesters.com>
Wed, 24 Oct 2007 19:40:07 +0000 (19:40 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Wed, 24 Oct 2007 19:40:07 +0000 (19:40 +0000)
same easy handle
Fixed the filecheck: make target to work outside the source tree

CHANGES
tests/README
tests/data/DISABLED
tests/data/Makefile.am
tests/data/test2000 [new file with mode: 0644]
tests/data/test2001 [new file with mode: 0644]
tests/data/test51

diff --git a/CHANGES b/CHANGES
index bbb25bc..a56faf6 100644 (file)
--- 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
index 0b21a64..592e7cd 100644 (file)
@@ -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
index 95953ea..a9a056a 100644 (file)
@@ -4,3 +4,5 @@
 # per line.
 # Lines starting with '#' letters are treated as comments.
 #1009
+2000
+2001
index a632067..3cb6b2a 100644 (file)
@@ -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 (file)
index 0000000..ff679c5
--- /dev/null
@@ -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\r
+PASS ftp@example.com\r
+PWD\r
+EPSV\r
+TYPE I\r
+SIZE 2000\r
+RETR 2000\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2001 b/tests/data/test2001
new file mode 100644 (file)
index 0000000..c468ac2
--- /dev/null
@@ -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\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPSV\r
+TYPE I\r
+SIZE 20010002\r
+RETR 20010002\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
index f197300..b58c357 100644 (file)
@@ -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