aboutsummaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
authorPavel Raiskup <xraisk00@gmail.com>2010-05-12 15:33:22 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-05-12 23:17:51 +0200
commit0825cd80a62c21725fb3615f1fdd3aa6cc5f0f34 (patch)
tree6c6e3f2cfc9767031e1c2093a522d80d7f18edcb /tests/data
parent04cb15ae9dc0e863487ee55de2226cf5033311c0 (diff)
FTP: WILDCARDMATCH/CHUNKING/FNMATCH added
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/Makefile.am1
-rw-r--r--tests/data/test111371
-rw-r--r--tests/data/test1114136
-rw-r--r--tests/data/test1462
-rw-r--r--tests/data/test1492
-rw-r--r--tests/data/test5392
-rw-r--r--tests/data/test57471
-rw-r--r--tests/data/test57579
-rw-r--r--tests/data/test576192
-rw-r--r--tests/data/test57738
10 files changed, 591 insertions, 3 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index dabe3d195..a8cf5d7a6 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -60,6 +60,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
test1072 test1073 test1074 test1075 test1076 test1077 test1078 test1079 \
test1080 test1081 test1082 test1083 test1084 test1085 test633 test634 \
test635 test636 test637 test558 test559 test1086 test1087 test1088 \
+ test574 test575 test576 test577 test1113 test1114 \
test1089 test1090 test1091 test1092 test1093 test1094 test1095 test1096 \
test1097 test560 test561 test1098 test1099 test562 test563 test1100 \
test564 test1101 test1102 test1103 test1104 test299 test310 test311 \
diff --git a/tests/data/test1113 b/tests/data/test1113
new file mode 100644
index 000000000..6ff1d1951
--- /dev/null
+++ b/tests/data/test1113
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+FTP
+wildcardmatch
+ftplistparser
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data mode="text">
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib574
+</tool>
+<name>
+FTP wildcard download - changed fnmatch, 2x perform (DOS LIST response)
+</name>
+<command>
+ftp://%HOSTIP:%FTPPORT/fully_simulated/DOS/*.txt
+</command>
+</client>
+
+############################################
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+0
+</errorcode>
+<strip>
+^RETR.*
+^EPSV.*
+^PWD.*
+^CWD.*
+^TYPE.*
+^LIST.*
+</strip>
+<strippart>
+s/USER.*/USER/
+s/PASS.*/PASS/
+s/QUIT.*/QUIT/
+</strippart>
+# THERE SHOULD NOT BE "SIZE"! and once "USER && PASS"
+<protocol>
+USER
+PASS
+QUIT
+</protocol>
+<stdout mode="text">
+This file should have permissions 444
+This file should have permissions 666
+This file should have permissions 777
+This is content of file "file.txt"
+Some junk ;-) This file does not really exist.
+This file should have permissions 444
+This file should have permissions 666
+This file should have permissions 777
+This is content of file "file.txt"
+Some junk ;-) This file does not really exist.
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1114 b/tests/data/test1114
new file mode 100644
index 000000000..8eee4293b
--- /dev/null
+++ b/tests/data/test1114
@@ -0,0 +1,136 @@
+<testcase>
+<info>
+<keywords>
+FTP
+wildcardmatch
+ftplistparser
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib576
+</tool>
+ <name>
+FTP wildcard download - skip/parser_correctness/CURLOPT_FNMATCH_FUNCTION (DOS)
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/fully_simulated/DOS/*
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+0
+</errorcode>
+<stdout mode="text">
+=============================================================
+Remains: 12
+Filename: .
+Size: 0B
+Time: 04-27-10 05:12AM
+Filetype: directory
+=============================================================
+Remains: 11
+Filename: ..
+Size: 0B
+Time: 04-23-10 03:12AM
+Filetype: directory
+=============================================================
+Remains: 10
+Filename: chmod1
+Size: 38B
+Time: 01-11-10 10:00AM
+Filetype: regular file
+Content:
+-------------------------------------------------------------
+This file should have permissions 444
+-------------------------------------------------------------
+=============================================================
+Remains: 9
+Filename: chmod2
+Size: 38B
+Time: 02-01-10 08:00AM
+Filetype: regular file
+Content:
+-------------------------------------------------------------
+This file should have permissions 666
+-------------------------------------------------------------
+=============================================================
+Remains: 8
+Filename: chmod3
+Size: 38B
+Time: 02-01-10 08:00AM
+Filetype: regular file
+Content:
+-------------------------------------------------------------
+This file should have permissions 777
+-------------------------------------------------------------
+=============================================================
+Remains: 7
+Filename: chmod4
+Size: 0B
+Time: 05-04-10 04:31AM
+Filetype: directory
+=============================================================
+Remains: 6
+Filename: chmod5
+Size: 0B
+Time: 05-04-10 04:31AM
+Filetype: directory
+=============================================================
+Remains: 5
+Filename: empty_file.dat
+Size: 0B
+Time: 04-27-10 11:01AM
+Filetype: regular file
+Content:
+-------------------------------------------------------------
+-------------------------------------------------------------
+=============================================================
+Remains: 4
+Filename: file.txt
+Size: 35B
+Time: 04-27-10 11:01AM
+Filetype: regular file
+Content:
+-------------------------------------------------------------
+This is content of file "file.txt"
+-------------------------------------------------------------
+=============================================================
+Remains: 3
+Filename: .NeXT
+Size: 0B
+Time: 01-23-05 02:05AM
+Filetype: directory
+=============================================================
+Remains: 2
+Filename: someothertext.txt
+Size: 47B
+Time: 04-27-10 11:01AM
+Filetype: regular file
+Content:
+-------------------------------------------------------------
+# THIS CONTENT WAS SKIPPED IN CHUNK_BGN CALLBACK #
+-------------------------------------------------------------
+=============================================================
+Remains: 1
+Filename: weirddir.txt
+Size: 0B
+Time: 04-23-10 03:12AM
+Filetype: directory
+=============================================================
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test146 b/tests/data/test146
index e04f8f04d..3cd4bd5aa 100644
--- a/tests/data/test146
+++ b/tests/data/test146
@@ -45,7 +45,7 @@ EPSV
TYPE I
SIZE 146
RETR 146
-CWD /nowhere/anywhere
+CWD /
EPSV
SIZE 146
RETR 146
diff --git a/tests/data/test149 b/tests/data/test149
index bdbdcc77f..f7973f497 100644
--- a/tests/data/test149
+++ b/tests/data/test149
@@ -34,7 +34,7 @@ CWD dir1
EPSV
TYPE I
STOR 149
-CWD /nowhere/anywhere
+CWD /
CWD dir2
EPSV
STOR 149
diff --git a/tests/data/test539 b/tests/data/test539
index f1ad70107..2406c5473 100644
--- a/tests/data/test539
+++ b/tests/data/test539
@@ -53,7 +53,7 @@ TYPE I
SIZE 539
RETR 539
SYST
-CWD /nowhere/anywhere
+CWD /
EPSV
TYPE A
LIST path/to/the/file/539./
diff --git a/tests/data/test574 b/tests/data/test574
new file mode 100644
index 000000000..9d500457a
--- /dev/null
+++ b/tests/data/test574
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+FTP
+wildcardmatch
+ftplistparser
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data mode="text">
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib574
+</tool>
+<name>
+FTP wildcard download - changed fnmatch, 2x perform (UNIX LIST response)
+</name>
+<command>
+ftp://%HOSTIP:%FTPPORT/fully_simulated/UNIX/*.txt
+</command>
+</client>
+
+############################################
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+0
+</errorcode>
+<strip>
+^RETR.*
+^EPSV.*
+^PWD.*
+^CWD.*
+^TYPE.*
+^LIST.*
+</strip>
+<strippart>
+s/USER.*/USER/
+s/PASS.*/PASS/
+s/QUIT.*/QUIT/
+</strippart>
+# THERE SHOULD NOT BE "SIZE"! and once "USER && PASS"
+<protocol>
+USER
+PASS
+QUIT
+</protocol>
+<stdout mode="text">
+This file should have permissions 444
+This file should have permissions 666
+This file should have permissions 777
+This is content of file "file.txt"
+Some junk ;-) This file does not really exist.
+This file should have permissions 444
+This file should have permissions 666
+This file should have permissions 777
+This is content of file "file.txt"
+Some junk ;-) This file does not really exist.
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test575 b/tests/data/test575
new file mode 100644
index 000000000..c460467d2
--- /dev/null
+++ b/tests/data/test575
@@ -0,0 +1,79 @@
+<testcase>
+<info>
+<keywords>
+FTP
+multi
+wildcardmatch
+ftplistparser
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib575
+</tool>
+ <name>
+FTP wildcard download - dup_handle && multi interface
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/fully_simulated/UNIX/*
+</command>
+</client>
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^RETR.*
+^EPSV.*
+^CWD.*
+^PWD.*
+^TYPE.*
+</strip>
+<strippart>
+s/^USER.*/USER/
+s/^PASS.*/PASS/
+s/^LIST.*/LIST/
+s/^QUIT.*/QUIT/
+</strippart>
+<errorcode>
+0
+</errorcode>
+<protocol>
+USER
+PASS
+LIST
+LIST
+QUIT
+USER
+PASS
+LIST
+QUIT
+</protocol>
+<stdout mode="text">
+This file should have permissions 444
+This file should have permissions 666
+This file should have permissions 777
+This is content of file "file.txt"
+Some junk ;-) This file does not really exist.
+This file should have permissions 444
+This file should have permissions 666
+This file should have permissions 777
+This is content of file "file.txt"
+Some junk ;-) This file does not really exist.
+This file should have permissions 444
+This file should have permissions 666
+This file should have permissions 777
+This is content of file "file.txt"
+Some junk ;-) This file does not really exist.
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test576 b/tests/data/test576
new file mode 100644
index 000000000..4d4b90c80
--- /dev/null
+++ b/tests/data/test576
@@ -0,0 +1,192 @@
+<testcase>
+<info>
+<keywords>
+FTP
+wildcardmatch
+ftplistparser
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib576
+</tool>
+ <name>
+FTP wildcard download - skip/parser_correctness/CURLOPT_FNMATCH_FUNCTION (UNIX)
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/fully_simulated/UNIX/*
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+0
+</errorcode>
+<stdout mode="text">
+=============================================================
+Remains: 14
+Filename: .
+Permissions: rwxrwxrwx (parsed => 777)
+Size: 20480B
+User: ftp-default
+Group: ftp-default
+Time: Apr 27 5:12
+Filetype: directory
+=============================================================
+Remains: 13
+Filename: ..
+Permissions: rwxrwxrwx (parsed => 777)
+Size: 20480B
+User: ftp-default
+Group: ftp-default
+Time: Apr 23 3:12
+Filetype: directory
+=============================================================
+Remains: 12
+Filename: chmod1
+Permissions: r--r--r-- (parsed => 444)
+Size: 38B
+User: ftp-default
+Group: ftp-default
+Time: Jan 11 10:00
+Filetype: regular file
+Content:
+-------------------------------------------------------------
+This file should have permissions 444
+-------------------------------------------------------------
+=============================================================
+Remains: 11
+Filename: chmod2
+Permissions: rw-rw-rw- (parsed => 666)
+Size: 38B
+User: ftp-default
+Group: ftp-default
+Time: Feb 1 8:00
+Filetype: regular file
+Content:
+-------------------------------------------------------------
+This file should have permissions 666
+-------------------------------------------------------------
+=============================================================
+Remains: 10
+Filename: chmod3
+Permissions: rwxrwxrwx (parsed => 777)
+Size: 38B
+User: ftp-default
+Group: ftp-default
+Time: Feb 1 8:00
+Filetype: regular file
+Content:
+-------------------------------------------------------------
+This file should have permissions 777
+-------------------------------------------------------------
+=============================================================
+Remains: 9
+Filename: chmod4
+Permissions: --S--S--t (parsed => 7001)
+Size: 4096B
+User: ftp-default
+Group: ftp-default
+Time: May 4 4:31
+Filetype: directory
+=============================================================
+Remains: 8
+Filename: chmod5
+Permissions: --s--s--T (parsed => 7110)
+Size: 4096B
+User: ftp-default
+Group: ftp-default
+Time: May 4 4:31
+Filetype: directory
+=============================================================
+Remains: 7
+Filename: empty_file.dat
+Permissions: rw-r--r-- (parsed => 644)
+Size: 0B
+User: ftp-default
+Group: ftp-default
+Time: Apr 27 11:01
+Filetype: regular file
+Content:
+-------------------------------------------------------------
+-------------------------------------------------------------
+=============================================================
+Remains: 6
+Filename: file.txt
+Permissions: rw-r--r-- (parsed => 644)
+Size: 35B
+User: ftp-default
+Group: ftp-default
+Time: Apr 27 11:01
+Filetype: regular file
+Content:
+-------------------------------------------------------------
+This is content of file "file.txt"
+-------------------------------------------------------------
+=============================================================
+Remains: 5
+Filename: link
+Permissions: rwxrwxrwx (parsed => 777)
+Size: 0B
+User: ftp-default
+Group: ftp-default
+Time: Jan 6 4:42
+Filetype: symlink
+Target: file.txt
+=============================================================
+Remains: 4
+Filename: link_absolute
+Permissions: rwxrwxrwx (parsed => 777)
+Size: 0B
+User: ftp-default
+Group: ftp-default
+Time: Jan 6 4:45
+Filetype: symlink
+Target: /data/ftp/file.txt
+=============================================================
+Remains: 3
+Filename: .NeXT
+Permissions: rwxrwxrwx (parsed => 777)
+Size: 4096B
+User: ftp-default
+Group: ftp-default
+Time: Jan 23 2:05
+Filetype: directory
+=============================================================
+Remains: 2
+Filename: someothertext.txt
+Permissions: rw-r--r-- (parsed => 644)
+Size: 47B
+User: ftp-default
+Group: ftp-default
+Time: Apr 27 11:01
+Filetype: regular file
+Content:
+-------------------------------------------------------------
+# THIS CONTENT WAS SKIPPED IN CHUNK_BGN CALLBACK #
+-------------------------------------------------------------
+=============================================================
+Remains: 1
+Filename: weirddir.txt
+Permissions: rwxr-xrwx (parsed => 757)
+Size: 4096B
+User: ftp-default
+Group: ftp-default
+Time: Apr 23 3:12
+Filetype: directory
+=============================================================
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test577 b/tests/data/test577
new file mode 100644
index 000000000..5f1898f70
--- /dev/null
+++ b/tests/data/test577
@@ -0,0 +1,38 @@
+<testcase>
+<info>
+<keywords>
+wildcardmatch
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib577
+</tool>
+
+ <name>
+Curl_fnmatch() testing
+ </name>
+ <command>
+nothing
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout mode="text">
+===========================
+===========================
+</stdout>
+</verify>
+</testcase>