New test cases added
authorDaniel Stenberg <daniel@haxx.se>
Tue, 12 Jun 2001 09:12:59 +0000 (09:12 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 12 Jun 2001 09:12:59 +0000 (09:12 +0000)
tests/data/Makefile.am
tests/data/test101 [new file with mode: 0644]
tests/data/test102 [new file with mode: 0644]
tests/data/test103 [new file with mode: 0644]
tests/data/test104 [new file with mode: 0644]
tests/data/test105 [new file with mode: 0644]
tests/data/test106 [new file with mode: 0644]
tests/data/test107 [new file with mode: 0644]
tests/data/test33 [new file with mode: 0644]

index b37932e..3a00b2d 100644 (file)
@@ -5,6 +5,7 @@ test:
        [ -f test1 ] || ln -s $(srcdir)/test* .
 
 EXTRA_DIST = \
-test1    test11   test14   test3    test400  test7    \
-test10   test12   test2    test300  test5    test8    \
-test100  test13   test200  test4    test6    test9    
+test1    test102  test106  test13   test3    test400  test8    \
+test10   test103  test107  test14   test300  test5    test9    \
+test100  test104  test11   test2    test33   test6    \
+test101  test105  test12   test200  test4    test7    
diff --git a/tests/data/test101 b/tests/data/test101
new file mode 100644 (file)
index 0000000..ea9b9b8
--- /dev/null
@@ -0,0 +1,41 @@
+# Server-side
+<reply>
+<data>
+total 20\r
+drwxr-xr-x   8 98       98           512 Oct 22 13:06 .\r
+drwxr-xr-x   8 98       98           512 Oct 22 13:06 ..\r
+drwxr-xr-x   2 98       98           512 May  2  1996 .NeXT\r
+-r--r--r--   1 0        1             35 Jul 16  1996 README\r
+lrwxrwxrwx   1 0        1              7 Dec  9  1999 bin -> usr/bin\r
+dr-xr-xr-x   2 0        1            512 Oct  1  1997 dev\r
+drwxrwxrwx   2 98       98           512 May 29 16:04 download.html\r
+dr-xr-xr-x   2 0        1            512 Nov 30  1995 etc\r
+drwxrwxrwx   2 98       1            512 Oct 30 14:33 pub\r
+dr-xr-xr-x   5 0        1            512 Oct  1  1997 usr\r
+</data>
+</reply>
+
+# Client-side
+<client>
+ <name>
+FTP dir list, PORT with specified IP
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/ -P %HOSTIP
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^PORT 127,0,0,1,.*
+</strip>
+<protocol>
+USER anonymous\r
+PASS curl_by_daniel@haxx.se\r
+PWD\r
+PORT 127,0,0,1,243,212\r
+TYPE A\r
+LIST\r
+</protocol>
+</verify>
diff --git a/tests/data/test102 b/tests/data/test102
new file mode 100644 (file)
index 0000000..138e57c
--- /dev/null
@@ -0,0 +1,33 @@
+# Server-side
+<reply>
+<data>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+</reply>
+
+# Client-side
+<client>
+ <name>
+FTP RETR PASV
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/102
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS curl_by_daniel@haxx.se\r
+PWD\r
+PASV\r
+TYPE I\r
+RETR 102\r
+</protocol>
+</verify>
diff --git a/tests/data/test103 b/tests/data/test103
new file mode 100644 (file)
index 0000000..b3a2288
--- /dev/null
@@ -0,0 +1,37 @@
+# Server-side
+<reply>
+<data>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+</reply>
+
+# Client-side
+<client>
+ <name>
+FTP RETR PORT with CWD
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/a/path/103 -P -
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^PORT .*
+</strip>
+<protocol>
+USER anonymous\r
+PASS curl_by_daniel@haxx.se\r
+PWD\r
+CWD a/path\r
+PORT 127,0,0,1,246,33\r
+TYPE I\r
+RETR 103\r
+</protocol>
+</verify>
diff --git a/tests/data/test104 b/tests/data/test104
new file mode 100644 (file)
index 0000000..b4cf3e1
--- /dev/null
@@ -0,0 +1,29 @@
+# Server-side
+<reply>
+<size>
+51
+</size>
+</reply>
+
+# Client-side
+<client>
+ <name>
+FTP --head to get file size only
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/a/path/103 --head
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS curl_by_daniel@haxx.se\r
+PWD\r
+CWD a/path\r
+MDTM 103\r
+TYPE I\r
+SIZE 103\r
+</protocol>
+</verify>
diff --git a/tests/data/test105 b/tests/data/test105
new file mode 100644 (file)
index 0000000..3cecc29
--- /dev/null
@@ -0,0 +1,33 @@
+# Server-side
+<reply>
+<data>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+</reply>
+
+# Client-side
+<client>
+ <name>
+FTP user+password in URL and ASCII transfer
+ </name>
+ <command>
+ftp://userdude:passfellow@%HOSTIP:%FTPPORT/103 --use-ascii
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER userdude\r
+PASS passfellow\r
+PWD\r
+PASV\r
+TYPE A\r
+RETR 103\r
+</protocol>
+</verify>
diff --git a/tests/data/test106 b/tests/data/test106
new file mode 100644 (file)
index 0000000..61c43b8
--- /dev/null
@@ -0,0 +1,34 @@
+# Server-side
+<reply>
+<data>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+</reply>
+
+# Client-side
+<client>
+ <name>
+FTP GET with type=A style ASCII URL using %20 codes
+ </name>
+ <command>
+"ftp://%HOSTIP:%FTPPORT//path%20with%20%20spaces/and%20things2/106;type=A"
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS curl_by_daniel@haxx.se\r
+PWD\r
+CWD /path with  spaces/and things2\r
+PASV\r
+TYPE A\r
+RETR 106\r
+</protocol>
+</verify>
diff --git a/tests/data/test107 b/tests/data/test107
new file mode 100644 (file)
index 0000000..98fa773
--- /dev/null
@@ -0,0 +1,38 @@
+
+# Client-side
+<client>
+ <name>
+FTP PASV upload file
+ </name>
+<file name="log/test107.txt">
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</file>
+ <command>
+ftp://%HOSTIP:%FTPPORT/107 -T log/test107.txt
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<upload>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</upload>
+<protocol>
+USER anonymous\r
+PASS curl_by_daniel@haxx.se\r
+PWD\r
+PASV\r
+TYPE I\r
+STOR 107\r
+</protocol>
+</verify>
diff --git a/tests/data/test33 b/tests/data/test33
new file mode 100644 (file)
index 0000000..f255bc4
--- /dev/null
@@ -0,0 +1,50 @@
+# Server-side
+<reply>
+<data>
+
+</data>
+</reply>
+
+# Client-side
+<client>
+ <name>
+HTTP PUT with resume
+ </name>
+<file name="log/test33.txt">
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+</file>
+ <command>
+http://%HOSTIP:%HOSTPORT/33 -Tlog/test33.txt -C 50
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+PUT /33 HTTP/1.1\r
+Content-Range: bytes 50-99/100\r
+User-Agent: curl/7.6 (sparc-sun-solaris2.7) libcurl 7.6-pre4 (SSL 0.9.6) (krb4 enabled)\r
+Host: 127.0.0.1:8999\r
+Pragma: no-cache\r
+Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r
+Content-Length: 50\r
+\r
+012345678
+012345678
+012345678
+012345678
+012345678
+</protocol>
+</verify>