diff options
author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2022-03-30 10:40:34 +0900 |
---|---|---|
committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2022-03-30 10:40:34 +0900 |
commit | 596b8e3faefe9e245b45198ae42296d3b0070f5f (patch) | |
tree | dfa9fb7921aea5317e1a152585c7fc0b1bc9eb03 /Test/D07multibyte.ztst | |
parent | 6617f192348f6ce71fd4ee16e55e9dc78927c520 (diff) | |
download | zsh-596b8e3faefe9e245b45198ae42296d3b0070f5f.tar.gz zsh-596b8e3faefe9e245b45198ae42296d3b0070f5f.tar.xz zsh-596b8e3faefe9e245b45198ae42296d3b0070f5f.zip |
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
Diffstat (limited to 'Test/D07multibyte.ztst')
-rw-r--r-- | Test/D07multibyte.ztst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst index 7f046525a..cbd802f23 100644 --- a/Test/D07multibyte.ztst +++ b/Test/D07multibyte.ztst @@ -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. |