aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-06-04 19:40:04 +0200
committerYang Tse <yangsita@gmail.com>2012-06-04 19:40:04 +0200
commit3bfff57e1f604ef0b2bc84243014eb9c9a1e6acc (patch)
treec66ed143b9da312a98762bb98fcc7e7a23917bdd
parent628e62a9660e3853a1ab4f26ad37547b9f10f160 (diff)
tests 1348 to 1355: several -O -J -i -D combinations with FTP protocol
Currently 1348 to 1354 succeed but a write failure is logged in traceNNNN. Currently 1355 fails, so disabled for now.
-rw-r--r--tests/data/DISABLED1
-rw-r--r--tests/data/Makefile.am3
-rw-r--r--tests/data/test134867
-rw-r--r--tests/data/test134984
-rw-r--r--tests/data/test135084
-rw-r--r--tests/data/test135185
-rw-r--r--tests/data/test135285
-rw-r--r--tests/data/test135384
-rw-r--r--tests/data/test135484
-rw-r--r--tests/data/test135584
10 files changed, 660 insertions, 1 deletions
diff --git a/tests/data/DISABLED b/tests/data/DISABLED
index 5a0f2bf95..310f3e9d2 100644
--- a/tests/data/DISABLED
+++ b/tests/data/DISABLED
@@ -5,3 +5,4 @@
594
1209
1211
+1355
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index c6d8d0432..44fcb3f6e 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -85,7 +85,8 @@ test1314 test1315 test1316 test1317 test1318 test1319 test1320 test1321 \
test1322 test1323 test1324 test1325 test1326 test1327 test1328 test1329 \
test1331 test1332 test1333 test1334 test1335 test1336 test1337 test1338 \
test1339 test1340 test1341 test1342 test1343 test1344 test1345 test1346 \
-test1347 \
+test1347 test1348 test1349 test1350 test1351 test1352 test1353 test1354 \
+test1355 \
test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
test2000 test2001 test2002 test2003 test2004
diff --git a/tests/data/test1348 b/tests/data/test1348
new file mode 100644
index 000000000..e6329b839
--- /dev/null
+++ b/tests/data/test1348
@@ -0,0 +1,67 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download file without Content-Disposition inside, using -O
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1348 -O
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1348
+RETR file1348
+QUIT
+</protocol>
+
+<file1 name="log/file1348">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1348">
+</file2>
+
+<file3 name="log/stdout1348">
+</file3>
+
+<file4 name="log/name1348">
+</file4>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1349 b/tests/data/test1349
new file mode 100644
index 000000000..6a3eb565a
--- /dev/null
+++ b/tests/data/test1349
@@ -0,0 +1,84 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download file without C-D inside, using -O -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1349 -O -D log/heads1349
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1349
+RETR file1349
+QUIT
+</protocol>
+
+<file1 name="log/file1349">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1349">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ <| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1349 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1349">
+</file3>
+
+<file4 name="log/name1349">
+</file4>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1350 b/tests/data/test1350
new file mode 100644
index 000000000..a85ed6014
--- /dev/null
+++ b/tests/data/test1350
@@ -0,0 +1,84 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download file without C-D inside, using -O -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1350 -O -D -
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1350
+RETR file1350
+QUIT
+</protocol>
+
+<file1 name="log/file1350">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1350">
+</file2>
+
+<file3 name="log/stdout1350">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ <| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1350 () (10 bytes).
+226 File transfer complete
+</file3>
+<stripfile3>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile3>
+
+<file4 name="log/name1350">
+</file4>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1351 b/tests/data/test1351
new file mode 100644
index 000000000..b1b471990
--- /dev/null
+++ b/tests/data/test1351
@@ -0,0 +1,85 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download file without C-D inside, using -O -J -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1351 -O -J -D log/heads1351
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1351
+RETR file1351
+QUIT
+</protocol>
+
+<file1 name="log/file1351">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1351">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ <| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1351 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1351">
+curl: Saved to filename '%PWD/log/file1351'
+</file3>
+
+<file4 name="log/name1351">
+</file4>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1352 b/tests/data/test1352
new file mode 100644
index 000000000..2de2754e2
--- /dev/null
+++ b/tests/data/test1352
@@ -0,0 +1,85 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download file without C-D inside, using -O -J -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1352 -O -J -D -
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1352
+RETR file1352
+QUIT
+</protocol>
+
+<file1 name="log/file1352">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1352">
+</file2>
+
+<file3 name="log/stdout1352">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ <| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1352 () (10 bytes).
+226 File transfer complete
+curl: Saved to filename '%PWD/log/file1352'
+</file3>
+<stripfile3>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile3>
+
+<file4 name="log/name1352">
+</file4>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1353 b/tests/data/test1353
new file mode 100644
index 000000000..fd4544107
--- /dev/null
+++ b/tests/data/test1353
@@ -0,0 +1,84 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download file without C-D inside, using -O -i -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1353 -O -i -D log/heads1353
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1353
+RETR file1353
+QUIT
+</protocol>
+
+<file1 name="log/file1353">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1353">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ <| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1353 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1353">
+</file3>
+
+<file4 name="log/name1353">
+</file4>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1354 b/tests/data/test1354
new file mode 100644
index 000000000..5d90b395c
--- /dev/null
+++ b/tests/data/test1354
@@ -0,0 +1,84 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download file without C-D inside, using -O -i -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1354 -O -i -D -
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1354
+RETR file1354
+QUIT
+</protocol>
+
+<file1 name="log/file1354">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1354">
+</file2>
+
+<file3 name="log/stdout1354">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ <| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1354 () (10 bytes).
+226 File transfer complete
+</file3>
+<stripfile3>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile3>
+
+<file4 name="log/name1354">
+</file4>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1355 b/tests/data/test1355
new file mode 100644
index 000000000..da0878ce7
--- /dev/null
+++ b/tests/data/test1355
@@ -0,0 +1,84 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download file without C-D inside, using -O -i, without -D
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1355 -O -i
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1355
+RETR file1355
+QUIT
+</protocol>
+
+<file1 name="log/file1355">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1355">
+</file2>
+
+<file3 name="log/stdout1355">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ <| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1355 () (10 bytes).
+226 File transfer complete
+</file3>
+<stripfile3>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile3>
+
+<file4 name="log/name1355">
+</file4>
+
+</verify>
+</testcase>