From 25d43d19d56d1bcbc93180bce782bac27ac801ff Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Mon, 20 Mar 2017 21:39:27 +0100 Subject: tests: strip more options from non-HTTP --libcurl tests The CURLOPT_USERAGENT and CURLOPT_MAXREDIRS options are only set if HTTP support is available, so ignore them in tests where HTTP is not guaranteed. --- tests/data/test1407 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests/data/test1407') diff --git a/tests/data/test1407 b/tests/data/test1407 index 922e42231..6b44cb79a 100644 --- a/tests/data/test1407 +++ b/tests/data/test1407 @@ -61,8 +61,6 @@ int main(int argc, char *argv[]) curl_easy_setopt(hnd, CURLOPT_HEADER, 1L); curl_easy_setopt(hnd, CURLOPT_DIRLISTONLY, 1L); curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret"); - curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped"); - curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L); curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L); @@ -96,10 +94,9 @@ int main(int argc, char *argv[]) /**** End of sample code ****/ -# curl's default user-agent varies with version, libraries etc. -s/(USERAGENT, \")[^\"]+/${1}stripped/ -# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with -# configurations - just ignore them +# These options vary with configurations - just ignore them +$_ = '' if /CURLOPT_USERAGENT/ +$_ = '' if /CURLOPT_MAXREDIRS/ $_ = '' if /CURLOPT_SSL_VERIFYPEER/ $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/ $_ = '' if /CURLOPT_HTTP_VERSION/ -- cgit v1.2.3