]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests/disable-scan.pl: properly detect multiple symbols per line
authorDaniel Stenberg <daniel@haxx.se>
Fri, 4 Feb 2022 13:46:29 +0000 (14:46 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 4 Feb 2022 15:41:57 +0000 (16:41 +0100)
Test 1165 would fail on some systems because it didn't detect
CURL_DISABLE_* symbols that were used to the right of another one on the
same line! The script would only detect and extract the first one.

Reported-by: Marcel Raad
Fixes #8384
Closes #8388

tests/disable-scan.pl

index 65f5b03cb6984e6fb8042be12d9d1e2b607244de..54d4625ab907f096da123a52ca0e8f9ecc0ee555 100755 (executable)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2010 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2010 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -63,7 +63,7 @@ sub scan_file {
     my ($source)=@_;
     open F, "<$source";
     while(<F>) {
-        if(/(CURL_DISABLE_[A-Z_]+)/g) {
+        while(s/(CURL_DISABLE_[A-Z_]+)//) {
             my ($sym)=($1);
             $file{$sym} = $source;
         }