From 0825cd80a62c21725fb3615f1fdd3aa6cc5f0f34 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 12 May 2010 15:33:22 +0200 Subject: FTP: WILDCARDMATCH/CHUNKING/FNMATCH added --- tests/data/Makefile.am | 1 + tests/data/test1113 | 71 ++++++++++++++++++ tests/data/test1114 | 136 +++++++++++++++++++++++++++++++++++ tests/data/test146 | 2 +- tests/data/test149 | 2 +- tests/data/test539 | 2 +- tests/data/test574 | 71 ++++++++++++++++++ tests/data/test575 | 79 ++++++++++++++++++++ tests/data/test576 | 192 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test577 | 38 ++++++++++ 10 files changed, 591 insertions(+), 3 deletions(-) create mode 100644 tests/data/test1113 create mode 100644 tests/data/test1114 create mode 100644 tests/data/test574 create mode 100644 tests/data/test575 create mode 100644 tests/data/test576 create mode 100644 tests/data/test577 (limited to 'tests/data') 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 @@ + + + +FTP +wildcardmatch +ftplistparser + + + +# +# Server-side + + + + + +# Client-side + + +ftp + + +lib574 + + +FTP wildcard download - changed fnmatch, 2x perform (DOS LIST response) + + +ftp://%HOSTIP:%FTPPORT/fully_simulated/DOS/*.txt + + + +############################################ +# Verify data after the test has been "shot" + + +0 + + +^RETR.* +^EPSV.* +^PWD.* +^CWD.* +^TYPE.* +^LIST.* + + +s/USER.*/USER/ +s/PASS.*/PASS/ +s/QUIT.*/QUIT/ + +# THERE SHOULD NOT BE "SIZE"! and once "USER && PASS" + +USER +PASS +QUIT + + +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. + + + 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 @@ + + + +FTP +wildcardmatch +ftplistparser + + + +# Server-side + + + + + +# Client-side + + +ftp + + +lib576 + + +FTP wildcard download - skip/parser_correctness/CURLOPT_FNMATCH_FUNCTION (DOS) + + +ftp://%HOSTIP:%FTPPORT/fully_simulated/DOS/* + + + +# Verify data after the test has been "shot" + + +0 + + +============================================================= +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 +============================================================= + + + 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 @@ + + + +FTP +wildcardmatch +ftplistparser + + + +# +# Server-side + + + + + +# Client-side + + +ftp + + +lib574 + + +FTP wildcard download - changed fnmatch, 2x perform (UNIX LIST response) + + +ftp://%HOSTIP:%FTPPORT/fully_simulated/UNIX/*.txt + + + +############################################ +# Verify data after the test has been "shot" + + +0 + + +^RETR.* +^EPSV.* +^PWD.* +^CWD.* +^TYPE.* +^LIST.* + + +s/USER.*/USER/ +s/PASS.*/PASS/ +s/QUIT.*/QUIT/ + +# THERE SHOULD NOT BE "SIZE"! and once "USER && PASS" + +USER +PASS +QUIT + + +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. + + + 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 @@ + + + +FTP +multi +wildcardmatch +ftplistparser + + + +# Server-side + + + + + +# Client-side + + +ftp + + +lib575 + + +FTP wildcard download - dup_handle && multi interface + + +ftp://%HOSTIP:%FTPPORT/fully_simulated/UNIX/* + + +# Verify data after the test has been "shot" + + +^RETR.* +^EPSV.* +^CWD.* +^PWD.* +^TYPE.* + + +s/^USER.*/USER/ +s/^PASS.*/PASS/ +s/^LIST.*/LIST/ +s/^QUIT.*/QUIT/ + + +0 + + +USER +PASS +LIST +LIST +QUIT +USER +PASS +LIST +QUIT + + +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. + + + 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 @@ + + + +FTP +wildcardmatch +ftplistparser + + + +# Server-side + + + + + +# Client-side + + +ftp + + +lib576 + + +FTP wildcard download - skip/parser_correctness/CURLOPT_FNMATCH_FUNCTION (UNIX) + + +ftp://%HOSTIP:%FTPPORT/fully_simulated/UNIX/* + + + +# Verify data after the test has been "shot" + + +0 + + +============================================================= +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 +============================================================= + + + 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 @@ + + + +wildcardmatch + + +# +# Server-side + + + +# Client-side + + +none + +# tool is what to use instead of 'curl' + +lib577 + + + +Curl_fnmatch() testing + + +nothing + + + +# +# Verify data after the test has been "shot" + + +=========================== +=========================== + + + -- cgit v1.2.3