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.
This commit is contained in:
Yang Tse 2012-06-04 19:40:04 +02:00
parent 628e62a966
commit 3bfff57e1f
10 changed files with 660 additions and 1 deletions

View File

@ -5,3 +5,4 @@
594
1209
1211
1355

View File

@ -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

67
tests/data/test1348 Normal file
View File

@ -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>

84
tests/data/test1349 Normal file
View File

@ -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>

84
tests/data/test1350 Normal file
View File

@ -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>

85
tests/data/test1351 Normal file
View File

@ -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>

85
tests/data/test1352 Normal file
View File

@ -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>

84
tests/data/test1353 Normal file
View File

@ -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>

84
tests/data/test1354 Normal file
View File

@ -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>

84
tests/data/test1355 Normal file
View File

@ -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>