summaryrefslogtreecommitdiff
path: root/tests/data/test1444
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2017-04-29 10:16:06 +0200
committerDan Fandrich <dan@coneharvesters.com>2017-04-29 10:16:06 +0200
commit584142892f7d5fb3100f3c0ef8e479d472b8c3c7 (patch)
tree95162e0852a9c8e7cd62698960d09cdb5501a926 /tests/data/test1444
parent2ce86d8509fa49d371af60d26bd934f90b99aeff (diff)
downloadgnurl-584142892f7d5fb3100f3c0ef8e479d472b8c3c7.tar.gz
gnurl-584142892f7d5fb3100f3c0ef8e479d472b8c3c7.tar.bz2
gnurl-584142892f7d5fb3100f3c0ef8e479d472b8c3c7.zip
tests: added --remote-time tests for remaining protocols that support it
Diffstat (limited to 'tests/data/test1444')
-rw-r--r--tests/data/test144452
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/data/test1444 b/tests/data/test1444
new file mode 100644
index 000000000..7eec21b99
--- /dev/null
+++ b/tests/data/test1444
@@ -0,0 +1,52 @@
+<testcase>
+<info>
+<keywords>
+FTP
+EPSV
+RETR
+--remote-time
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+file data
+</data>
+<mdtm>
+213 20090213233130
+</mdtm>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP with --remote-time
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1444 --remote-time
+</command>
+# Verify the mtime of the file. The mtime is specifically chosen to be an even
+# number so that it can be represented exactly on a FAT filesystem.
+<postcheck>
+perl -e 'exit((stat("log/curl1444.out"))[9] != 1234567890)'
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+MDTM 1444
+EPSV
+TYPE I
+SIZE 1444
+RETR 1444
+QUIT
+</protocol>
+</verify>
+</testcase>