mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:33:35 +03:00
tests: fix UTF-8 detection, per-test LC_* settings, CI coverage
- runtests: fix `codeset-utf8` feature detection. Before this patch it detected if the calling environment had UTF-8 enabled. If not, UTF-8 tests were all skipped. After this patch, it detects if UTF-8 is supported by the calling environment regardless of what's currently enabled. Follow-up to0b70b23ef4#15039 - GHA/linux: sync `codeset-test` to also reset `LC_CTYPE` and `LC_NUMBER`. To give it more spin. Follow-up toc221c0ee59#17938 - GHA/macos: fix to actually enable `codeset-test`. Also set `LC_ALL`, which seems necessary to trigger issues. Follow-up toc221c0ee59#17938 - tests/data: replace `LC_CTYPE` env with `LC_ALL` in all tests requiring a locale. Also to avoid potential issues with a blank or unset `LC_ALL`, as seen earlier. And to ensure that the override works on all platforms (as tested in CI.) Slight downside is that this now resets the language/culture to `C`. Ref:b4c9982382#4743 Ref:23208e330a#4738 - replace `en_US.UTF-8` with `C.UTF-8` to be language/culture-agnostic. - TEST-SUITE.md: drop `UTF-8` as a requirement for tests. Tests shall work (or least be skipped) without UTF-8 support. Tests requiring UTF-8 locale: 165, 962, 963, 964, 965, 966, 967, 1448, 1560, 2046, 2047 Tests requiring UTF-8 locale, but passing without one anyway: 955, 956, 957, 958, 959, 960, 961, 968, 1034, 1035 Spec 1997: https://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html Spec 2008: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html Ref:c221c0ee59#17938 Ref:7cf8414fabRef:4c140a5628Ref:28faaacee2#2436 Ref:ecd1d020abCloses #17988
This commit is contained in:
parent
c37e06c642
commit
1cc8a5235f
25 changed files with 51 additions and 45 deletions
|
|
@ -29,8 +29,7 @@ proxy
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
HTTP over proxy with malformatted IDN host name
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@ proxy
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
HTTP over proxy with too long IDN host name
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@ IDN
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
Redirect following to UTF-8 IDN host name
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ urlapi
|
|||
none
|
||||
</server>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<features>
|
||||
file
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ proxy
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
HTTP over proxy with IDN host name
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@ IDN
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
Connection reuse with IDN host name
|
||||
|
|
|
|||
|
|
@ -44,8 +44,7 @@ proxy
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
Connection reuse with IDN host name over HTTP proxy
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ smtp
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP without SMTPUTF8 support - UTF-8 based sender (local part only)
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@ smtp
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP without SMTPUTF8 support - UTF-8 based recipient (local part only)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ smtp
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP VRFY without SMTPUTF8 support - UTF-8 recipient (local part only)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ smtp
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP external VRFY without SMTPUTF8 - UTF-8 recipient (local part only)
|
||||
|
|
|
|||
|
|
@ -25,8 +25,7 @@ smtp
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP without SMTPUTF8 support - UTF-8 based sender (host part only)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ smtp
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP without SMTPUTF8 support - UTF-8 based recipient (host part only)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ smtp
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP external VRFY without SMTPUTF8 - UTF-8 recipient (host part only)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ IDN
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP without SMTPUTF8 support - UTF-8 based sender (host part only)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ IDN
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP without SMTPUTF8 support (IDN) - UTF-8 recipient (host part only)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ IDN
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP external VRFY without SMTPUTF8 (IDN) - UTF-8 recipient (host part)
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@ IDN
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP with SMTPUTF8 support - UTF-8 based sender
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@ IDN
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP with SMTPUTF8 support - UTF-8 based recipient
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@ IDN
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP external VRFY with SMTPUTF8 support
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@ IDN
|
|||
codeset-utf8
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=en_US.UTF-8
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
</setenv>
|
||||
<name>
|
||||
SMTP VRFY with SMTPUTF8 support
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue