From 873d70a6d8863346f4b70001b5a3d6d161086171 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 18 May 2011 21:48:14 +0200 Subject: tests: verify OPEN/CLOSESOCKETFUNCTION Test 585 and 586 were added. Using a modified lib500.c --- tests/data/Makefile.am | 3 ++- tests/data/test585 | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test586 | 59 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 tests/data/test585 create mode 100644 tests/data/test586 (limited to 'tests/data') 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 @@ + + + +HTTP +HTTP GET +multi +CURLOPT_OPENSOCKETFUNCTION +CURLOPT_CLOSESOCKETFUNCTION + + + +# Server-side + + +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 + + + +[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 + + + +# Client-side + + +http + + +http + +# tool is what to use instead of 'curl' + +lib585 + + + +socket open/close callbacks + + +http://%HOSTIP:%HTTPPORT/585 + + + +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /585 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + + + + 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 @@ + + + +FTP +PASV +CURLOPT_PORT + + +# +# Server-side + + +line 1 +line 2 +last line + + +[OPEN] counter: 1 +[OPEN] counter: 2 +line 1 +line 2 +last line +[CLOSE] counter: 2 +[CLOSE] counter: 1 + + + +# +# Client-side + + +ftp + + +lib585 + + +FTP and open/close socket callbacks + + +ftp://%HOSTIP:%FTPPORT/586 + + + +# +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +EPSV +TYPE I +SIZE 586 +RETR 586 +QUIT + + + -- cgit v1.2.3