From b08200d31c0b2d23cff27a5ddf4baeb966c85d59 Mon Sep 17 00:00:00 2001 From: Evgeny Grin Date: Thu, 8 Feb 2024 18:41:55 +0100 Subject: [PATCH] test1165: improve pattern matching * Fix excluded digits at the end of the symbols ('CURL_DISABLE_POP3' was checked as 'CURL_DISABLE_POP') Closes #12903 --- tests/test1165.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; } -- 2.47.3