aboutsummaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-05-18 21:48:14 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-05-18 22:56:46 +0200
commit873d70a6d8863346f4b70001b5a3d6d161086171 (patch)
tree4eb3c07dde31602670946396fd0a78d6ab95c4f5 /tests/data
parent6dfa16c3c47b0226b9835a7246bbc08d872e3eab (diff)
tests: verify OPEN/CLOSESOCKETFUNCTION
Test 585 and 586 were added. Using a modified lib500.c
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/Makefile.am3
-rw-r--r--tests/data/test58569
-rw-r--r--tests/data/test58659
3 files changed, 130 insertions, 1 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index ac5299714..2249394d9 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -47,7 +47,8 @@ test542 test543 test544 test545 test546 test547 test548 test549 test550 \
test551 test552 test553 test554 test555 test556 test557 test560 test561 \
test562 test563 test564 test565 test566 test567 test568 test569 test570 \
test571 test572 test573 test574 test575 test576 test578 test579 test580 \
-test581 test582 test583 test584 test600 test601 test602 test603 test604 \
+test581 test582 test583 test584 test585 test586 \
+test600 test601 test602 test603 test604 \
test605 test606 test607 test608 test609 test610 test611 test612 test613 \
test614 test615 test616 test617 test618 test619 test620 test621 test622 \
test623 test624 test625 test626 test627 test628 test629 test630 test631 \
diff --git a/tests/data/test585 b/tests/data/test585
new file mode 100644
index 000000000..32cb06fec
--- /dev/null
+++ b/tests/data/test585
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+CURLOPT_OPENSOCKETFUNCTION
+CURLOPT_CLOSESOCKETFUNCTION
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 302 eat this!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: this-is-the-first.html
+Content-Length: 0
+Connection: close
+
+</data>
+<datacheck>
+[OPEN] counter: 1
+HTTP/1.1 302 eat this!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: this-is-the-first.html
+Content-Length: 0
+Connection: close
+
+[CLOSE] counter: 1
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+lib585
+</tool>
+
+ <name>
+socket open/close callbacks
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/585
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /585 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test586 b/tests/data/test586
new file mode 100644
index 000000000..c0857bdd8
--- /dev/null
+++ b/tests/data/test586
@@ -0,0 +1,59 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+CURLOPT_PORT
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+line 1
+line 2
+last line
+</data>
+<datacheck>
+[OPEN] counter: 1
+[OPEN] counter: 2
+line 1
+line 2
+last line
+[CLOSE] counter: 2
+[CLOSE] counter: 1
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib585
+</tool>
+ <name>
+FTP and open/close socket callbacks
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/586
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+TYPE I
+SIZE 586
+RETR 586
+QUIT
+</protocol>
+</verify>
+</testcase>