diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index b37932edef9d4d6bcbfdd14a3d9a99a51dba291d..3a00b2d25e83a59553b9d83fc9e252ccb2159ccb 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -5,6 +5,7 @@ test: [ -f test1 ] || ln -s $(srcdir)/test* . EXTRA_DIST = \ -test1 test11 test14 test3 test400 test7 \ -test10 test12 test2 test300 test5 test8 \ -test100 test13 test200 test4 test6 test9 +test1 test102 test106 test13 test3 test400 test8 \ +test10 test103 test107 test14 test300 test5 test9 \ +test100 test104 test11 test2 test33 test6 \ +test101 test105 test12 test200 test4 test7 diff --git a/tests/data/test101 b/tests/data/test101 new file mode 100644 index 0000000000000000000000000000000000000000..ea9b9b891a2a0a990749e6b559a4a4301d37a955 --- /dev/null +++ b/tests/data/test101 @@ -0,0 +1,41 @@ +# Server-side +<reply> +<data> +total 20 +drwxr-xr-x 8 98 98 512 Oct 22 13:06 . +drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. +drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT +-r--r--r-- 1 0 1 35 Jul 16 1996 README +lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin +dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev +drwxrwxrwx 2 98 98 512 May 29 16:04 download.html +dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc +drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub +dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr +</data> +</reply> + +# Client-side +<client> + <name> +FTP dir list, PORT with specified IP + </name> + <command> +ftp://%HOSTIP:%FTPPORT/ -P %HOSTIP +</command> +</test> + +# Verify data after the test has been "shot" +<verify> +<strip> +^PORT 127,0,0,1,.* +</strip> +<protocol> +USER anonymous +PASS curl_by_daniel@haxx.se +PWD +PORT 127,0,0,1,243,212 +TYPE A +LIST +</protocol> +</verify> diff --git a/tests/data/test102 b/tests/data/test102 new file mode 100644 index 0000000000000000000000000000000000000000..138e57ca7b2b63878f035c635819be9b47481062 --- /dev/null +++ b/tests/data/test102 @@ -0,0 +1,33 @@ +# Server-side +<reply> +<data> +data + to + see +that FTP +works + so does it? +</data> +</reply> + +# Client-side +<client> + <name> +FTP RETR PASV + </name> + <command> +ftp://%HOSTIP:%FTPPORT/102 +</command> +</test> + +# Verify data after the test has been "shot" +<verify> +<protocol> +USER anonymous +PASS curl_by_daniel@haxx.se +PWD +PASV +TYPE I +RETR 102 +</protocol> +</verify> diff --git a/tests/data/test103 b/tests/data/test103 new file mode 100644 index 0000000000000000000000000000000000000000..b3a228853b0d656176a051c5a8f2e20e3c1f38f7 --- /dev/null +++ b/tests/data/test103 @@ -0,0 +1,37 @@ +# Server-side +<reply> +<data> +data + to + see +that FTP +works + so does it? +</data> +</reply> + +# Client-side +<client> + <name> +FTP RETR PORT with CWD + </name> + <command> +ftp://%HOSTIP:%FTPPORT/a/path/103 -P - +</command> +</test> + +# Verify data after the test has been "shot" +<verify> +<strip> +^PORT .* +</strip> +<protocol> +USER anonymous +PASS curl_by_daniel@haxx.se +PWD +CWD a/path +PORT 127,0,0,1,246,33 +TYPE I +RETR 103 +</protocol> +</verify> diff --git a/tests/data/test104 b/tests/data/test104 new file mode 100644 index 0000000000000000000000000000000000000000..b4cf3e145ea632a58a93c55f345116c031d51bfb --- /dev/null +++ b/tests/data/test104 @@ -0,0 +1,29 @@ +# Server-side +<reply> +<size> +51 +</size> +</reply> + +# Client-side +<client> + <name> +FTP --head to get file size only + </name> + <command> +ftp://%HOSTIP:%FTPPORT/a/path/103 --head +</command> +</test> + +# Verify data after the test has been "shot" +<verify> +<protocol> +USER anonymous +PASS curl_by_daniel@haxx.se +PWD +CWD a/path +MDTM 103 +TYPE I +SIZE 103 +</protocol> +</verify> diff --git a/tests/data/test105 b/tests/data/test105 new file mode 100644 index 0000000000000000000000000000000000000000..3cecc296c91453cd793c1696f9a2f3ccfa120117 --- /dev/null +++ b/tests/data/test105 @@ -0,0 +1,33 @@ +# Server-side +<reply> +<data> +data + to + see +that FTP +works + so does it? +</data> +</reply> + +# Client-side +<client> + <name> +FTP user+password in URL and ASCII transfer + </name> + <command> +ftp://userdude:passfellow@%HOSTIP:%FTPPORT/103 --use-ascii +</command> +</test> + +# Verify data after the test has been "shot" +<verify> +<protocol> +USER userdude +PASS passfellow +PWD +PASV +TYPE A +RETR 103 +</protocol> +</verify> diff --git a/tests/data/test106 b/tests/data/test106 new file mode 100644 index 0000000000000000000000000000000000000000..61c43b8f69bfb6bcd944df20a451c1d43def8131 --- /dev/null +++ b/tests/data/test106 @@ -0,0 +1,34 @@ +# Server-side +<reply> +<data> +data + to + see +that FTP +works + so does it? +</data> +</reply> + +# Client-side +<client> + <name> +FTP GET with type=A style ASCII URL using %20 codes + </name> + <command> +"ftp://%HOSTIP:%FTPPORT//path%20with%20%20spaces/and%20things2/106;type=A" +</command> +</test> + +# Verify data after the test has been "shot" +<verify> +<protocol> +USER anonymous +PASS curl_by_daniel@haxx.se +PWD +CWD /path with spaces/and things2 +PASV +TYPE A +RETR 106 +</protocol> +</verify> diff --git a/tests/data/test107 b/tests/data/test107 new file mode 100644 index 0000000000000000000000000000000000000000..98fa773ad7cd0868e3179f5dd34c6a5a92c0a591 --- /dev/null +++ b/tests/data/test107 @@ -0,0 +1,38 @@ + +# Client-side +<client> + <name> +FTP PASV upload file + </name> +<file name="log/test107.txt"> +data + to + see +that FTP +works + so does it? +</file> + <command> +ftp://%HOSTIP:%FTPPORT/107 -T log/test107.txt +</command> +</test> + +# Verify data after the test has been "shot" +<verify> +<upload> +data + to + see +that FTP +works + so does it? +</upload> +<protocol> +USER anonymous +PASS curl_by_daniel@haxx.se +PWD +PASV +TYPE I +STOR 107 +</protocol> +</verify> diff --git a/tests/data/test33 b/tests/data/test33 new file mode 100644 index 0000000000000000000000000000000000000000..f255bc4e0e7a8917fa573d7c93345cb08003e3e1 --- /dev/null +++ b/tests/data/test33 @@ -0,0 +1,50 @@ +# Server-side +<reply> +<data> + +</data> +</reply> + +# Client-side +<client> + <name> +HTTP PUT with resume + </name> +<file name="log/test33.txt"> +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +</file> + <command> +http://%HOSTIP:%HOSTPORT/33 -Tlog/test33.txt -C 50 +</command> +</test> + +# Verify data after the test has been "shot" +<verify> +<strip> +^User-Agent:.* +</strip> +<protocol> +PUT /33 HTTP/1.1 +Content-Range: bytes 50-99/100 +User-Agent: curl/7.6 (sparc-sun-solaris2.7) libcurl 7.6-pre4 (SSL 0.9.6) (krb4 enabled) +Host: 127.0.0.1:8999 +Pragma: no-cache +Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* +Content-Length: 50 + +012345678 +012345678 +012345678 +012345678 +012345678 +</protocol> +</verify>