From: Viktor Szakats Date: Wed, 26 Feb 2025 11:13:43 +0000 (+0100) Subject: test1167: catch #defines with extra whitespace X-Git-Tag: curl-8_13_0~335 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a1d00da81e630e5a850eab40ca59c4b5f253308e;p=thirdparty%2Fcurl.git test1167: catch #defines with extra whitespace Before this patch, it missed this in `curl/curl.h`: ```c # define __has_declspec_attribute(x) 0 ``` After this patch: ``` test 1167...[Verify curl prefix of public symbols in header files] /usr/bin/perl -I. -I. returned 1, when expecting 0 1167: exit FAILED == Contents of files in the log/14/ dir after test 1167 === Start of file server.cmd Testnum 1167 === End of file server.cmd === Start of file stdout1167 Bad symbols in public header files: __has_declspec_attribute(x) === End of file stdout1167 FAIL 1167: 'Verify curl prefix of public symbols in header files' source analysis TESTFAIL: These test cases failed: 1167 ``` Ref: #16491 Closes #16496 --- diff --git a/tests/test1167.pl b/tests/test1167.pl index 82c05d61aa..d180411a14 100755 --- a/tests/test1167.pl +++ b/tests/test1167.pl @@ -124,7 +124,7 @@ sub scanheader { open H, "<$f"; while() { my ($line, $linenum) = ($_, $.); - if (/^#define +([^ \n]*)/) { + if (/^ *# *define +([^ \n]*)/) { if($verbose) { print "Source: $f\n"; print "Symbol: $1\n";