From: Daniel Gustafsson Date: Mon, 6 May 2024 18:55:00 +0000 (+0200) Subject: tests: Only require EXAMPLE for non-deprecated options X-Git-Tag: curl-8_8_0~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26dd9f0c8c11d5c80ddc6c5bdea127a002d3a3e7;p=thirdparty%2Fcurl.git tests: Only require EXAMPLE for non-deprecated options Manpages which document deprecated CURLOPT_ or CURLINFO_ are not required to have an EXAMPLE section since they might effectively be dead no-ops which we don't want to trick users into believing they can use by copying example code. Closes: #13540 Reviewed-by: Daniel Stenberg --- diff --git a/tests/test1173.pl b/tests/test1173.pl index bf03c98cd8..e7126a120d 100755 --- a/tests/test1173.pl +++ b/tests/test1173.pl @@ -134,9 +134,10 @@ sub scanmanpage { open(my $m, "<", "$file") || die "test1173.pl could not open $file"; - if($file =~ /[\/\\](CURL|curl_)[^\/\\]*.3/) { - # This is a man page for libcurl. It requires an example! - $reqex = 1; + if($file =~ /[\/\\](CURL|curl_)([^\/\\]*).3/) { + # This is a man page for libcurl. It requires an example unless it's + # considered deprecated. + $reqex = 1 unless defined $deprecated{'CURL'.$2}; if($1 eq "CURL") { $optpage = 1; }