nine new test cases
This commit is contained in:
Родитель
c528dc53c9
Коммит
56da5a05be
|
@ -5,8 +5,9 @@ test:
|
|||
[ -f test1 ] || ln -s $(srcdir)/test* .
|
||||
|
||||
EXTRA_DIST = \
|
||||
test1 test102 test106 test13 test17 test300 test43 test8 \
|
||||
test10 test103 test107 test14 test2 test33 test5 test9 \
|
||||
test100 test104 test11 test15 test200 test4 test6 \
|
||||
test101 test105 test12 test16 test3 test400 test7 test201 \
|
||||
test202
|
||||
test1 test104 test13 test19 test21 test3 test5 \
|
||||
test10 test105 test14 test2 test22 test300 test6 \
|
||||
test100 test106 test15 test20 test23 test33 test7 \
|
||||
test101 test107 test16 test200 test24 test4 test8 \
|
||||
test102 test11 test17 test201 test25 test400 test9 \
|
||||
test103 test12 test18 test202 test26 test43
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
# Server-side
|
||||
<reply>
|
||||
<data nocheck=1>
|
||||
HTTP/1.1 200 OK
|
||||
Funny-head: yesyes
|
||||
|
||||
moo
|
||||
</data>
|
||||
<data2>
|
||||
HTTP/1.1 200 OK
|
||||
Funny-head: yesyes
|
||||
|
||||
foo
|
||||
</data2>
|
||||
<data3>
|
||||
HTTP/1.1 200 OK
|
||||
Funny-head: yesyes
|
||||
|
||||
hoo
|
||||
</data3>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<name>
|
||||
multiple requests using {} in URL
|
||||
</name>
|
||||
<command>
|
||||
'%HOSTIP:%HOSTPORT/{18,180002,180003}'
|
||||
</command>
|
||||
</test>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<strip>
|
||||
^User-Agent:.*
|
||||
</strip>
|
||||
<protocol>
|
||||
GET /18 HTTP/1.1
|
||||
User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
|
||||
Host: 127.0.0.1:8999
|
||||
Pragma: no-cache
|
||||
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||
|
||||
GET /180002 HTTP/1.1
|
||||
User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
|
||||
Host: 127.0.0.1:8999
|
||||
Pragma: no-cache
|
||||
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||
|
||||
GET /180003 HTTP/1.1
|
||||
User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
|
||||
Host: 127.0.0.1:8999
|
||||
Pragma: no-cache
|
||||
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||
|
||||
</protocol>
|
||||
<stdout>
|
||||
--_curl_--127.0.0.1:8999/18
|
||||
HTTP/1.1 200 OK
|
||||
Funny-head: yesyes
|
||||
|
||||
moo
|
||||
--_curl_--127.0.0.1:8999/180002
|
||||
HTTP/1.1 200 OK
|
||||
Funny-head: yesyes
|
||||
|
||||
foo
|
||||
--_curl_--127.0.0.1:8999/180003
|
||||
HTTP/1.1 200 OK
|
||||
Funny-head: yesyes
|
||||
|
||||
hoo
|
||||
</stdout>
|
||||
</verify>
|
|
@ -0,0 +1,22 @@
|
|||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<name>
|
||||
attempt connect to non-listening socket
|
||||
</name>
|
||||
<command>
|
||||
%HOSTIP:60000
|
||||
</command>
|
||||
</test>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<errorcode>
|
||||
7
|
||||
</errorcode>
|
||||
</verify>
|
|
@ -0,0 +1,22 @@
|
|||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<name>
|
||||
attempt connect to non-existing host name
|
||||
</name>
|
||||
<command>
|
||||
non-existing-and-weeeeeeirdname
|
||||
</command>
|
||||
</test>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<errorcode>
|
||||
6
|
||||
</errorcode>
|
||||
</verify>
|
|
@ -0,0 +1,22 @@
|
|||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<name>
|
||||
use curl with multiple request methods
|
||||
</name>
|
||||
<command>
|
||||
-I -X FOOO localhost
|
||||
</command>
|
||||
</test>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<errorcode>
|
||||
2
|
||||
</errorcode>
|
||||
</verify>
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -0,0 +1,22 @@
|
|||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<name>
|
||||
unsupported protocol:// URL
|
||||
</name>
|
||||
<command>
|
||||
htfp://%HOSTIP:%HOSTPORT/none.htfml
|
||||
</command>
|
||||
</test>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<errorcode>
|
||||
1
|
||||
</errorcode>
|
||||
</verify>
|
|
@ -0,0 +1,37 @@
|
|||
# Server-side
|
||||
<reply>
|
||||
<data nocheck=1>
|
||||
HTTP/1.0 404 BAD BOY
|
||||
Content-Type: text/html
|
||||
|
||||
This silly page doesn't reaaaaaly exist so you should not get it.
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<name>
|
||||
HTTP GET fail silently on HTTP error return
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HOSTPORT/24 --fail
|
||||
</command>
|
||||
</test>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<strip>
|
||||
^User-Agent: curl/.*
|
||||
</strip>
|
||||
<protocol>
|
||||
GET /24 HTTP/1.1
|
||||
User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
|
||||
Host: 127.0.0.1:8999
|
||||
Pragma: no-cache
|
||||
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||
|
||||
</protocol>
|
||||
<errorcode>
|
||||
22
|
||||
</errorcode>
|
||||
</verify>
|
|
@ -0,0 +1,109 @@
|
|||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
HTTP/1.1 301 This is a weirdo text message
|
||||
Server: test-server/fake
|
||||
Location: data/reply/25
|
||||
Content-Length: 32
|
||||
Connection: close
|
||||
|
||||
Redirect to the same URL again!
|
||||
</data>
|
||||
<datacheck>
|
||||
HTTP/1.1 301 This is a weirdo text message
|
||||
Server: test-server/fake
|
||||
Location: data/reply/25
|
||||
Content-Length: 32
|
||||
Connection: close
|
||||
|
||||
HTTP/1.1 301 This is a weirdo text message
|
||||
Server: test-server/fake
|
||||
Location: data/reply/25
|
||||
Content-Length: 32
|
||||
Connection: close
|
||||
|
||||
HTTP/1.1 301 This is a weirdo text message
|
||||
Server: test-server/fake
|
||||
Location: data/reply/25
|
||||
Content-Length: 32
|
||||
Connection: close
|
||||
|
||||
HTTP/1.1 301 This is a weirdo text message
|
||||
Server: test-server/fake
|
||||
Location: data/reply/25
|
||||
Content-Length: 32
|
||||
Connection: close
|
||||
|
||||
HTTP/1.1 301 This is a weirdo text message
|
||||
Server: test-server/fake
|
||||
Location: data/reply/25
|
||||
Content-Length: 32
|
||||
Connection: close
|
||||
|
||||
HTTP/1.1 301 This is a weirdo text message
|
||||
Server: test-server/fake
|
||||
Location: data/reply/25
|
||||
Content-Length: 32
|
||||
Connection: close
|
||||
|
||||
</datacheck>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<name>
|
||||
looping HTTP Location: following with --max-redirs, no persistance
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HOSTPORT/want/25 -L --max-redirs 5
|
||||
</command>
|
||||
</test>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<strip>
|
||||
^User-Agent: curl/.*
|
||||
</strip>
|
||||
<protocol>
|
||||
GET /want/25 HTTP/1.1
|
||||
User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
|
||||
Host: 127.0.0.1:8999
|
||||
Pragma: no-cache
|
||||
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||
|
||||
GET /want/data/reply/25 HTTP/1.1
|
||||
User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
|
||||
Host: 127.0.0.1:8999
|
||||
Pragma: no-cache
|
||||
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||
|
||||
GET /want/data/reply/data/reply/25 HTTP/1.1
|
||||
User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
|
||||
Host: 127.0.0.1:8999
|
||||
Pragma: no-cache
|
||||
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||
|
||||
GET /want/data/reply/data/reply/data/reply/25 HTTP/1.1
|
||||
User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
|
||||
Host: 127.0.0.1:8999
|
||||
Pragma: no-cache
|
||||
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||
|
||||
GET /want/data/reply/data/reply/data/reply/data/reply/25 HTTP/1.1
|
||||
User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
|
||||
Host: 127.0.0.1:8999
|
||||
Pragma: no-cache
|
||||
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||
|
||||
GET /want/data/reply/data/reply/data/reply/data/reply/data/reply/25 HTTP/1.1
|
||||
User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
|
||||
Host: 127.0.0.1:8999
|
||||
Pragma: no-cache
|
||||
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||
|
||||
</protocol>
|
||||
|
||||
<errorcode>
|
||||
47
|
||||
</errorcode>
|
||||
</verify>
|
|
@ -0,0 +1,32 @@
|
|||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
HTTP/1.1 200 Mooo
|
||||
Server: test-server/fake
|
||||
Connection: close
|
||||
|
||||
*flopp*
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<name>
|
||||
specify more -o than URLs
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HOSTPORT/want/26 -o - -o -
|
||||
</command>
|
||||
</test>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<protocol>
|
||||
GET /want/26 HTTP/1.1
|
||||
User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
|
||||
Host: 127.0.0.1:8999
|
||||
Pragma: no-cache
|
||||
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||
|
||||
</protocol>
|
||||
</verify>
|
Загрузка…
Ссылка в новой задаче