From: Evgeny Grin Date: Thu, 8 Feb 2024 17:41:55 +0000 (+0100) Subject: test1165: improve pattern matching X-Git-Tag: curl-8_7_0~183 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b08200d31c0b2d23cff27a5ddf4baeb966c85d59;p=thirdparty%2Fcurl.git test1165: improve pattern matching * Fix excluded digits at the end of the symbols ('CURL_DISABLE_POP3' was checked as 'CURL_DISABLE_POP') Closes #12903 --- diff --git a/tests/test1165.pl b/tests/test1165.pl index b6f3179cf7..bccbef9366 100755 --- a/tests/test1165.pl +++ b/tests/test1165.pl @@ -44,7 +44,7 @@ sub scanconf { my ($f)=@_; open S, "<$f"; while() { - if(/(CURL_DISABLE_[A-Z_]+)/g) { + if(/(CURL_DISABLE_[A-Z0-9_]+)/g) { my ($sym)=($1); $disable{$sym} = 1; } @@ -67,9 +67,9 @@ sub scanconf_cmake { my ($f)=@_; open S, "<$f"; while() { - if(/(CURL_DISABLE_[A-Z_]+)/g) { + if(/(CURL_DISABLE_[A-Z0-9_]+)/g) { my ($sym)=($1); - if(not $sym =~ /(CURL_DISABLE_INSTALL|CURL_DISABLE_TESTS|CURL_DISABLE_SRP)/) { + if(not $sym =~ /^(CURL_DISABLE_INSTALL|CURL_DISABLE_TESTS|CURL_DISABLE_SRP)$/) { $disable_cmake{$sym} = 1; } } @@ -85,7 +85,7 @@ sub scan_file { my ($source)=@_; open F, "<$source"; while() { - while(s/(CURL_DISABLE_[A-Z_]+)//) { + while(s/(CURL_DISABLE_[A-Z0-9_]+)//) { my ($sym)=($1); $file{$sym} = $source; } @@ -115,7 +115,7 @@ sub scan_docs { my $line = 0; while() { $line++; - if(/^## `(CURL_DISABLE_[A-Z_]+)/g) { + if(/^## `(CURL_DISABLE_[A-Z0-9_]+)`/g) { my ($sym)=($1); $docs{$sym} = $line; }