aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-06-12 09:12:59 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-06-12 09:12:59 +0000
commit6475600afa57c777aa10187c3d1c49fc5f4bf7f5 (patch)
treeb5b0ea5b3433aab8a3c89ba20e07995398f98de9
parente450888b15571375d5cf3e26c3b164f6bf297183 (diff)
New test cases added
-rw-r--r--tests/data/Makefile.am7
-rw-r--r--tests/data/test10141
-rw-r--r--tests/data/test10233
-rw-r--r--tests/data/test10337
-rw-r--r--tests/data/test10429
-rw-r--r--tests/data/test10533
-rw-r--r--tests/data/test10634
-rw-r--r--tests/data/test10738
-rw-r--r--tests/data/test3350
9 files changed, 299 insertions, 3 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index b37932ede..3a00b2d25 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -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
index 000000000..ea9b9b891
--- /dev/null
+++ b/tests/data/test101
@@ -0,0 +1,41 @@
+# Server-side
+<reply>
+<data>
+total 20
+drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
+drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
+drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT
+-r--r--r-- 1 0 1 35 Jul 16 1996 README
+lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
+dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
+drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
+dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
+drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
+dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
+</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
+PASS curl_by_daniel@haxx.se
+PWD
+PORT 127,0,0,1,243,212
+TYPE A
+LIST
+</protocol>
+</verify>
diff --git a/tests/data/test102 b/tests/data/test102
new file mode 100644
index 000000000..138e57ca7
--- /dev/null
+++ b/tests/data/test102
@@ -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
+PASS curl_by_daniel@haxx.se
+PWD
+PASV
+TYPE I
+RETR 102
+</protocol>
+</verify>
diff --git a/tests/data/test103 b/tests/data/test103
new file mode 100644
index 000000000..b3a228853
--- /dev/null
+++ b/tests/data/test103
@@ -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
+PASS curl_by_daniel@haxx.se
+PWD
+CWD a/path
+PORT 127,0,0,1,246,33
+TYPE I
+RETR 103
+</protocol>
+</verify>
diff --git a/tests/data/test104 b/tests/data/test104
new file mode 100644
index 000000000..b4cf3e145
--- /dev/null
+++ b/tests/data/test104
@@ -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
+PASS curl_by_daniel@haxx.se
+PWD
+CWD a/path
+MDTM 103
+TYPE I
+SIZE 103
+</protocol>
+</verify>
diff --git a/tests/data/test105 b/tests/data/test105
new file mode 100644
index 000000000..3cecc296c
--- /dev/null
+++ b/tests/data/test105
@@ -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
+PASS passfellow
+PWD
+PASV
+TYPE A
+RETR 103
+</protocol>
+</verify>
diff --git a/tests/data/test106 b/tests/data/test106
new file mode 100644
index 000000000..61c43b8f6
--- /dev/null
+++ b/tests/data/test106
@@ -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
+PASS curl_by_daniel@haxx.se
+PWD
+CWD /path with spaces/and things2
+PASV
+TYPE A
+RETR 106
+</protocol>
+</verify>
diff --git a/tests/data/test107 b/tests/data/test107
new file mode 100644
index 000000000..98fa773ad
--- /dev/null
+++ b/tests/data/test107
@@ -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
+PASS curl_by_daniel@haxx.se
+PWD
+PASV
+TYPE I
+STOR 107
+</protocol>
+</verify>
diff --git a/tests/data/test33 b/tests/data/test33
new file mode 100644
index 000000000..f255bc4e0
--- /dev/null
+++ b/tests/data/test33
@@ -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
+Content-Range: bytes 50-99/100
+User-Agent: curl/7.6 (sparc-sun-solaris2.7) libcurl 7.6-pre4 (SSL 0.9.6) (krb4 enabled)
+Host: 127.0.0.1:8999
+Pragma: no-cache
+Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
+Content-Length: 50
+
+012345678
+012345678
+012345678
+012345678
+012345678
+</protocol>
+</verify>