mirror of
https://github.com/curl/curl.git
synced 2025-03-31 16:00:35 +08:00
test1903: actually verify the cookies after the test
The test otherwise could do just about anything (except leak memory in debug mode) and its bad behaviour wouldn't be detected. Now, check the resulting cookie file to ensure the cookies are still there. Closes #12041
This commit is contained in:
parent
361cd3edab
commit
911d37bb2f
@ -33,7 +33,7 @@ CURLOPT_COOKIEFILE then reset then set again
|
||||
lib%TESTNUMBER
|
||||
</tool>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER %LOGDIR/cookies%TESTNUMBER
|
||||
http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER %LOGDIR/cookies%TESTNUMBER %LOGDIR/cookiesout%TESTNUMBER
|
||||
</command>
|
||||
<features>
|
||||
cookies
|
||||
@ -50,5 +50,13 @@ cookies
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<file name="%LOGDIR/cookiesout%TESTNUMBER" mode="text">
|
||||
# Netscape HTTP Cookie File
|
||||
# https://curl.se/docs/http-cookies.html
|
||||
# This file was generated by libcurl! Edit at your own risk.
|
||||
|
||||
%HOSTIP FALSE /we/want/ FALSE 0 foobar name
|
||||
%HOSTIP FALSE /we/want/ FALSE 0 secondcookie present
|
||||
</file>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
@ -46,6 +46,7 @@ int test(char *URL)
|
||||
|
||||
easy_setopt(ch, CURLOPT_URL, URL);
|
||||
easy_setopt(ch, CURLOPT_COOKIEFILE, libtest_arg2);
|
||||
easy_setopt(ch, CURLOPT_COOKIEJAR, libtest_arg3);
|
||||
res = curl_easy_perform(ch);
|
||||
|
||||
test_cleanup:
|
||||
|
Loading…
x
Reference in New Issue
Block a user