summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-09-13 12:51:07 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-09-13 12:51:07 +0000
commit5c344fc23ad129b6aaa2974ea59f025844b2935c (patch)
treeaeb40593ac4a6b5531220cc8c307801d2d705135
parent5a905e0bb81582843fd7a250d694091ac5a6bb08 (diff)
downloadgnurl-5c344fc23ad129b6aaa2974ea59f025844b2935c.tar.gz
gnurl-5c344fc23ad129b6aaa2974ea59f025844b2935c.tar.bz2
gnurl-5c344fc23ad129b6aaa2974ea59f025844b2935c.zip
ftp tests added
-rw-r--r--tests/data/Makefile.am12
-rw-r--r--tests/data/test10839
-rw-r--r--tests/data/test10937
-rw-r--r--tests/data/test11036
-rw-r--r--tests/data/test11133
5 files changed, 151 insertions, 6 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 67922012a..ac625474c 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -5,9 +5,9 @@ test:
[ -f test1 ] || ln -s $(srcdir)/test* .
EXTRA_DIST = \
-test1 test104 test13 test19 test21 test3 test5 \
-test10 test105 test14 test2 test22 test300 test6 \
-test100 test106 test15 test20 test23 test33 test7 \
-test101 test107 test16 test200 test24 test4 test8 \
-test102 test11 test17 test201 test25 test400 test9 \
-test103 test12 test18 test202 test26 test43 test44
+test1 test104 test11 test15 test20 test23 test33 test6 \
+test10 test105 test110 test16 test200 test24 test4 test7 \
+test100 test106 test111 test17 test201 test25 test400 test8 \
+test101 test107 test12 test18 test202 test26 test43 test9 \
+test102 test108 test13 test19 test21 test3 test44 \
+test103 test109 test14 test2 test22 test300 test5
diff --git a/tests/data/test108 b/tests/data/test108
new file mode 100644
index 000000000..5ae7c2a72
--- /dev/null
+++ b/tests/data/test108
@@ -0,0 +1,39 @@
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+ <name>
+FTP PORT upload with CWD
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/CWD/STOR/RETR/108 -T log/upload108 -P -
+</command>
+<file name="log/upload108">
+Moooooooooooo
+ upload this
+</file>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^PORT .*
+</strip>
+<protocol>
+USER anonymous
+PASS curl_by_daniel@haxx.se
+PWD
+CWD CWD/STOR/RETR
+PORT 127,0,0,1,5,109
+TYPE I
+STOR 108
+</protocol>
+<upload>
+Moooooooooooo
+ upload this
+</upload>
+</verify>
diff --git a/tests/data/test109 b/tests/data/test109
new file mode 100644
index 000000000..18661885d
--- /dev/null
+++ b/tests/data/test109
@@ -0,0 +1,37 @@
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+ <name>
+FTP PASV upload append
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/109 -T log/upload109 --append
+</command>
+<file name="log/upload109">
+Moooooooooooo
+ upload this
+</file>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+</strip>
+<protocol>
+USER anonymous
+PASS curl_by_daniel@haxx.se
+PWD
+PASV
+TYPE I
+APPE 109
+</protocol>
+<upload>
+Moooooooooooo
+ upload this
+</upload>
+</verify>
diff --git a/tests/data/test110 b/tests/data/test110
new file mode 100644
index 000000000..ce0df48d3
--- /dev/null
+++ b/tests/data/test110
@@ -0,0 +1,36 @@
+# Server-side
+<reply>
+<data>
+expected to be a file without the first part
+but we emulate that
+</data>
+<size>
+85
+</size>
+</reply>
+
+# Client-side
+<client>
+ <name>
+FTP download resume with set limit
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/110 -C 20
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+</strip>
+<protocol>
+USER anonymous
+PASS curl_by_daniel@haxx.se
+PWD
+PASV
+TYPE I
+SIZE 110
+REST 20
+RETR 110
+</protocol>
+</verify>
diff --git a/tests/data/test111 b/tests/data/test111
new file mode 100644
index 000000000..6201f3494
--- /dev/null
+++ b/tests/data/test111
@@ -0,0 +1,33 @@
+# Server-side
+<reply>
+<size>
+85
+</size>
+</reply>
+
+# Client-side
+<client>
+ <name>
+FTP download resume beyond file size
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/111 -C 2000
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+36
+</errorcode>
+<strip>
+</strip>
+<protocol>
+USER anonymous
+PASS curl_by_daniel@haxx.se
+PWD
+PASV
+TYPE I
+SIZE 111
+</protocol>
+</verify>