mirror of
https://github.com/curl/curl.git
synced 2026-05-17 18:06:21 +03:00
tests: replace significant invisible spaces with macros
To make them explicit, visible, avoid being accidentally trimmed. Also prevents Git warnings, e.g. on `git am`. Also: - runtests: add support for `%spc%` and `%tab%` macros. - test59: delete non-significant line-ending space. - spacecheck.pl: drop line-ending whitespace exception for tests. Closes #19300
This commit is contained in:
parent
928363f28c
commit
d29f14b9cf
41 changed files with 64 additions and 58 deletions
7
.github/scripts/spacecheck.pl
vendored
7
.github/scripts/spacecheck.pl
vendored
|
|
@ -42,10 +42,6 @@ my @need_crlf = (
|
|||
"\\.(bat|sln)\$",
|
||||
);
|
||||
|
||||
my @space_at_eol = (
|
||||
"^tests/data/test",
|
||||
);
|
||||
|
||||
my @non_ascii_allowed = (
|
||||
'\xC3\xB6', # UTF-8 for https://codepoints.net/U+00F6 LATIN SMALL LETTER O WITH DIAERESIS
|
||||
);
|
||||
|
|
@ -129,8 +125,7 @@ while(my $filename = <$git_ls_files>) {
|
|||
push @err, "content: must use LF EOL for this file type";
|
||||
}
|
||||
|
||||
if(!fn_match($filename, @space_at_eol) &&
|
||||
$content =~ /[ \t]\n/) {
|
||||
if($content =~ /[ \t]\n/) {
|
||||
my $line;
|
||||
for my $l (split(/\n/, $content)) {
|
||||
$line++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue