mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
spacecheck.pl: verify tests/data/test* for non-ASCII chars
Exclude test data files (4 of them) based on existing feature tags:
`codeset-utf8` and `Unicode`.
Add the new keyword `non-ascii` to mark remaining exceptions (9 files).
Follow-up to 838dc53bb7 #17247
Closes #17329
This commit is contained in:
parent
fca1fdc988
commit
9243ed59b3
3
.github/scripts/spacecheck.pl
vendored
3
.github/scripts/spacecheck.pl
vendored
@ -69,7 +69,6 @@ my @non_ascii = (
|
||||
"docs/THANKS",
|
||||
"docs/THANKS-filter",
|
||||
"tests/libtest/lib1560.c",
|
||||
"^tests/data/test",
|
||||
);
|
||||
|
||||
sub fn_match {
|
||||
@ -162,7 +161,7 @@ while(my $filename = <$git_ls_files>) {
|
||||
$content =~ s/[$non_ascii_allowed]//g;
|
||||
|
||||
if(!fn_match($filename, @non_ascii) &&
|
||||
$content =~ /([\x80-\xff]+)/) {
|
||||
($content =~ /([\x80-\xff]+)/ && $content !~ /^(codeset-utf8|Unicode|non-ascii)/m)) {
|
||||
push @err, "content: has non-ASCII: '$1'";
|
||||
}
|
||||
|
||||
|
||||
@ -226,6 +226,10 @@ Tests that have strict timing dependencies have the `timing-dependent` keyword.
|
||||
These are intended to eventually be treated specially on CI builds which are
|
||||
often run on overloaded machines with unpredictable timing.
|
||||
|
||||
Tests using non-7-bit-ASCII characters, and not using features `Unicode` or
|
||||
`codeset-utf8`, need to add the `non-ascii` keyword to tell the code checker
|
||||
to allow these characters.
|
||||
|
||||
## `<reply>`
|
||||
|
||||
### `<data [nocheck="yes"] [sendzero="yes"] [hex="yes"] [nonewline="yes"] [crlf="yes"]>`
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
HTTP
|
||||
HTTP GET
|
||||
followlocation
|
||||
non-ascii
|
||||
</keywords>
|
||||
</info>
|
||||
#
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
HTTP
|
||||
HTTP GET
|
||||
cookies
|
||||
non-ascii
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
FTP
|
||||
HTTPS proxy
|
||||
flaky
|
||||
non-ascii
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
FTP
|
||||
HTTPS proxy
|
||||
flaky
|
||||
non-ascii
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ HTTP
|
||||
HTTP GET
|
||||
cookies
|
||||
cookiejar
|
||||
non-ascii
|
||||
</keywords>
|
||||
</info>
|
||||
# Server-side
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
non-ascii
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
non-ascii
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
<keywords>
|
||||
HTTP
|
||||
HTTP GET
|
||||
non-ascii
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
<keywords>
|
||||
HTTP
|
||||
HTTP GET
|
||||
non-ascii
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
<keywords>
|
||||
SMTP
|
||||
MULTIPART
|
||||
non-ascii
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user