]> granicus.if.org Git - curl/commitdiff
tests 1348 to 1355: several -O -J -i -D combinations with FTP protocol
authorYang Tse <yangsita@gmail.com>
Mon, 4 Jun 2012 17:40:04 +0000 (19:40 +0200)
committerYang Tse <yangsita@gmail.com>
Mon, 4 Jun 2012 17:40:04 +0000 (19:40 +0200)
Currently 1348 to 1354 succeed but a write failure is logged in traceNNNN.

Currently 1355 fails, so disabled for now.

tests/data/DISABLED
tests/data/Makefile.am
tests/data/test1348 [new file with mode: 0644]
tests/data/test1349 [new file with mode: 0644]
tests/data/test1350 [new file with mode: 0644]
tests/data/test1351 [new file with mode: 0644]
tests/data/test1352 [new file with mode: 0644]
tests/data/test1353 [new file with mode: 0644]
tests/data/test1354 [new file with mode: 0644]
tests/data/test1355 [new file with mode: 0644]

index 5a0f2bf95dada8f9a1c644ba5d57f5fa526be87a..310f3e9d292e6d69961fe10fc53e82ebf725b079 100644 (file)
@@ -5,3 +5,4 @@
 594
 1209
 1211
+1355
index c6d8d0432284b181aae12bdfd1f44fe1b2aa6b53..44fcb3f6ef06f4e6acaf15ca0928b9d20d64c42d 100644 (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
 
diff --git a/tests/data/test1348 b/tests/data/test1348
new file mode 100644 (file)
index 0000000..e6329b8
--- /dev/null
@@ -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\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1348\r
+RETR file1348\r
+QUIT\r
+</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 (file)
index 0000000..6a3eb56
--- /dev/null
@@ -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\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1349\r
+RETR file1349\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1349">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1349">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1349 () (10 bytes).\r
+226 File transfer complete\r
+</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 (file)
index 0000000..a85ed60
--- /dev/null
@@ -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\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1350\r
+RETR file1350\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1350">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1350">
+</file2>
+
+<file3 name="log/stdout1350">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1350 () (10 bytes).\r
+226 File transfer complete\r
+</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 (file)
index 0000000..b1b4719
--- /dev/null
@@ -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\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1351\r
+RETR file1351\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1351">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1351">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1351 () (10 bytes).\r
+226 File transfer complete\r
+</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 (file)
index 0000000..2de2754
--- /dev/null
@@ -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\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1352\r
+RETR file1352\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1352">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1352">
+</file2>
+
+<file3 name="log/stdout1352">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1352 () (10 bytes).\r
+226 File transfer complete\r
+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 (file)
index 0000000..fd45441
--- /dev/null
@@ -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\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1353\r
+RETR file1353\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1353">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1353">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1353 () (10 bytes).\r
+226 File transfer complete\r
+</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 (file)
index 0000000..5d90b39
--- /dev/null
@@ -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\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1354\r
+RETR file1354\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1354">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1354">
+</file2>
+
+<file3 name="log/stdout1354">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1354 () (10 bytes).\r
+226 File transfer complete\r
+</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 (file)
index 0000000..da0878c
--- /dev/null
@@ -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\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1355\r
+RETR file1355\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1355">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1355">
+</file2>
+
+<file3 name="log/stdout1355">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1355 () (10 bytes).\r
+226 File transfer complete\r
+</file3>
+<stripfile3>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile3>
+
+<file4 name="log/name1355">
+</file4>
+
+</verify>
+</testcase>