Commit b6ca1be1 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

test case converted to the new file format

parent 20d67917
Loading
Loading
Loading
Loading

tests/data/test10

0 → 100644
+56 −0
Original line number Diff line number Diff line
# Server-side
<reply>
<data>
HTTP/1.0 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake

blablabla

</data>
</reply>

# Client-side
<client>
 <name>
simple HTTP PUT from file
 </name>
 <command>
http://%HOSTIP:%HOSTPORT/we/want/10 -T log/test10.txt
</command>
<file name="log/test10.txt">
Weird
     file
         to
   upload
for
   testing
the
   PUT
      feature
</file>
</test>

# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
PUT /we/want/10 HTTP/1.1
Host: 127.0.0.1:8999
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Content-Length: 78

Weird
     file
         to
   upload
for
   testing
the
   PUT
      feature
</protocol>
</verify>

tests/data/test11

0 → 100644
+64 −0
Original line number Diff line number Diff line
# Server-side
<reply>
<data>
HTTP/1.1 301 This is a weirdo text message
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Location: data/110002.txt?coolsite=yes
Connection: close

This server reply is for testing a simple Location: following

</data>
<data2>
HTTP/1.1 200 Followed here fine
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake

If this is received, the location following worked

</data2>
<datacheck>
HTTP/1.1 301 This is a weirdo text message
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Location: data/110002.txt?coolsite=yes
Connection: close

HTTP/1.1 200 Followed here fine
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake

If this is received, the location following worked

</datacheck>
</reply>

# Client-side
<client>
 <name>
simple HTTP Location: following
 </name>
 <command>
http://%HOSTIP:%HOSTPORT/want/11 -L
</command>
</test>

# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /want/11 HTTP/1.1
Host: 127.0.0.1:8999
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

GET /want/data/110002.txt?coolsite=yes HTTP/1.1
Host: 127.0.0.1:8999
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

</protocol>
</verify>

tests/data/test12

0 → 100644
+44 −0
Original line number Diff line number Diff line
# Server-side
<reply>
<data>
HTTP/1.1 206 Partial Content
Date: Mon, 13 Nov 2000 13:41:09 GMT
Server: Apache/1.3.11 (Unix) PHP/3.0.14
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Content-Length: 101
Content-Range: bytes 100-200/3527
Connection: close
Content-Type: text/html

ink="#ffffff" vlink="#cccccc">
<table width=100% cellspacing=0 cellpadding=0 border=0>
 <tr> 0123456
</data>
</reply>

# Client-side
<client>
 <name>
HTTP range support
 </name>
 <command>
http://%HOSTIP:%HOSTPORT/want/12 -r 100-200
</command>
</test>

# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /want/12 HTTP/1.1
Range: bytes=100-200
Host: 127.0.0.1:8999
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

</protocol>
</verify>

tests/data/test13

0 → 100644
+34 −0
Original line number Diff line number Diff line
# Server-side
<reply>
<data>
HTTP/1.1 200 Read you
Deleted: suppose we got a header like this! ;-)

blabla custom request result

</data>
</reply>

# Client-side
<client>
 <name>
HTTP custom request 'DELETE'
 </name>
 <command>
http://%HOSTIP:%HOSTPORT/want/13 -X DELETE
</command>
</test>

# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
DELETE /want/13 HTTP/1.1
Host: 127.0.0.1:8999
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

</protocol>
</verify>

tests/data/test14

0 → 100644
+34 −0
Original line number Diff line number Diff line
# Server-side
<reply>
<data>
HTTP/1.1 200 OK
Server: thebest/1.0
Connection: close

</data>
</reply>

# Client-side
<client>
 <name>
HTTP HEAD with Connection: close
 </name>
 <command>
http://%HOSTIP:%HOSTPORT/want/14 -i --head
</command>
</test>

# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
HEAD /want/14 HTTP/1.1
User-Agent: curl/7.4.2-pre4 (sparc-sun-solaris2.7) libcurl 7.4.2-pre4
Host: 127.0.0.1:8999
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

</protocol>
</verify>
Loading