three more HTTP tests added from the old test suite
authorDaniel Stenberg <daniel@haxx.se>
Thu, 14 Jun 2001 12:05:30 +0000 (12:05 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 14 Jun 2001 12:05:30 +0000 (12:05 +0000)
tests/data/Makefile.am
tests/data/test15 [new file with mode: 0644]
tests/data/test16 [new file with mode: 0644]
tests/data/test17 [new file with mode: 0644]

index 3a00b2d25e83a59553b9d83fc9e252ccb2159ccb..2d25741c9d4b0c1e8b56365c0fcbc0fb90279244 100644 (file)
@@ -5,7 +5,7 @@ test:
        [ -f test1 ] || ln -s $(srcdir)/test* .
 
 EXTRA_DIST = \
-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    
+test1    test102  test106  test13   test17   test300  test5    test9 \
+test10   test103  test107  test14   test2    test33   test6    \
+test100  test104  test11   test15   test200  test4    test7    \
+test101  test105  test12   test16   test3    test400  test8    
diff --git a/tests/data/test15 b/tests/data/test15
new file mode 100644 (file)
index 0000000..4a89537
--- /dev/null
@@ -0,0 +1,44 @@
+# Server-side
+<reply>
+<data nocheck=true>
+HTTP/1.4 200 OK\r
+Fake: yes\r
+Fake: yes\r
+Fake: yes\r
+\r
+Repeated nonsense-headers
+</data>
+</reply>
+
+# Client-side
+<client>
+ <name>
+--write-out test
+ </name>
+ <command>
+http://%HOSTIP:%HOSTPORT/want/15 --write-out '%{url_effective} %{http_code} %{size_download}\n'
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+HTTP/1.4 200 OK\r
+Fake: yes\r
+Fake: yes\r
+Fake: yes\r
+\r
+Repeated nonsense-headers
+http://127.0.0.1:8999/want/15 200 26
+</stdout>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /want/15 HTTP/1.1\r
+Host: 127.0.0.1:8999\r
+Pragma: no-cache\r
+Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r
+\r
+</protocol>
+</verify>
diff --git a/tests/data/test16 b/tests/data/test16
new file mode 100644 (file)
index 0000000..eadcedd
--- /dev/null
@@ -0,0 +1,37 @@
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Type: text/html\r
+Funny-head: yesyes\r
+\r
+the content goes here
+</data>
+</reply>
+
+# Client-side
+<client>
+ <name>
+HTTP with proxy athorization
+ </name>
+ <command>
+ -U fake@user:§§§looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong -x %HOSTIP:%HOSTPORT http://we.want.that.site.com/16
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://we.want.that.site.com/16 HTTP/1.1\r
+Proxy-authorization: Basic ZmFrZUB1c2VyOqenp2xvb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb28=\r
+Host: we.want.that.site.com\r
+Pragma: no-cache\r
+Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r
+\r
+</protocol>
+</verify>
diff --git a/tests/data/test17 b/tests/data/test17
new file mode 100644 (file)
index 0000000..ae799bd
--- /dev/null
@@ -0,0 +1,42 @@
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Funny-head: yesyes
+
+This is the proof it works
+</data>
+</reply>
+
+# Client-side
+<client>
+ <name>
+HTTP with config file on stdin
+ </name>
+ <stdin>
+#
+# Use a silly request without '--':
+request MOOO
+#
+# Set the user-agent using a short-option:
+-A "agent007 license to drill\t"
+#
+# long option *with* '--':
+--max-time 180
+ </stdin>
+ <command>
+-K - %HOSTIP:%HOSTPORT/that.site.com/17
+</command>
+</test>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+MOOO /that.site.com/17 HTTP/1.1\r
+User-Agent: agent007 license to drill  \r
+Host: 127.0.0.1:8999\r
+Pragma: no-cache\r
+Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r
+\r
+</protocol>
+</verify>