1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-06-01 04:46:08 +02:00

49910: move multibyte-related f-flagged test from E03 to D07

POSIX requires printf should calculate width/precision in %s conversion
in bytes (not in characters) even in multibyte locale
This commit is contained in:
Jun-ichi Takimoto 2022-03-30 10:40:34 +09:00
parent 6617f19234
commit 596b8e3fae
3 changed files with 15 additions and 5 deletions

View File

@ -1,5 +1,8 @@
2022-03-30 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 49910: Test/D07multibyte.ztst, Test/E03posix.ztst: move
multibyte-related incompatibility with POSIX from E03 to D07
* 49908: Test/ztst.zsh: reset LC_CTYPE to C during tests.
2022-03-29 Bart Schaefer <schaefer@zsh.org>

View File

@ -347,6 +347,18 @@
0:Multibyte characters in printf widths
> főo
# TODO?: POSIX requires that printf should always compute width and
# precision of '%s' conversion in bytes, while zsh computes them in
# characters if multi-byte locale is in use.
ARGV0=sh $ZTST_testdir/../Src/zsh -c "printf '<%10s>\n' St$'\M-C\M-)'phane"
0f:POSIX: width in %s should be computed in bytes, not in characters
F:This is considered a bugfix in zsh
>< Stéphane>
ARGV0=sh $ZTST_testdir/../Src/zsh -c "printf '<%7.5s>\n' St$'\M-C\M-)'phane"
0f:POSIX: precision should also be computed in bytes, not in characers
>< Stép>
# We ask for case-insensitive sorting here (and supply upper case
# characters) so that we exercise the logic in the shell that lowers the
# case of the string for case-insensitive sorting.

View File

@ -157,10 +157,5 @@ F:POSIX has neither math functions nor floating point
-f:EUID is not a special variable
>10
ARGV0=sh $ZTST_testdir/../Src/zsh -c "printf '<%10s>\n' St$'\M-C\M-)'phane"
0f:Width of %s is computed in bytes not characters
F:This is considered a bugfix in zsh
>< Stéphane>
PPID=foo
-f:PPID is not a readonly variable