zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Jun T <takimoto-j@kba.biglobe.ne.jp>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Test ./E03posix.ztst was expected to fail, but passed.
Date: Tue, 22 Mar 2022 14:04:30 -0700	[thread overview]
Message-ID: <CAH+w=7baJiXR1MJy00VfeHDymzK7q-xXQXL1TbeeJ0RAW1dV9A@mail.gmail.com> (raw)
In-Reply-To: <F3C8B677-1990-4EB5-9B49-8E906836D8D9@kba.biglobe.ne.jp>

On Mon, Mar 21, 2022 at 8:33 PM Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:
>
> [1] Does this patch solve the problem?

All tests pass for me on Ubuntu (which isn't a change from before the
patch, but is not a regression either)

> [2] Why is the test marked "expected to fail"?

POSIX printf counts bytes regardless of locale, zsh printf counts
characters in multibyte locales.  The test is expected to fail because
the sample output represents counting characters.  If the test
succeeds, zsh is not following POSIX printf requirements, and we need
to find out why.  Theoretically, if we've correctly implemented
POSIX_BUILTINS, we should not have to test in the C locale in order
for this test to "fail as expected" and if it succeeds (as not
expected) in any locale, something is wrong with the builtin.

Sorry for not following up on that sooner.  It may mean your patch is
actually masking a problem.

> What does 'F:This is considered a bugfix in zsh' mean?

# It is also possible to add lines in the redirection section beginning
# with `F:'.  The remaining text on all such lines will be concatenated
# (with newlines in between) and displayed in the event of an error.

Specifically in this instance, we consider it a POSIX bug that '%s'
always counts byte positions and that zsh has fixed this when it
counts character positions.

> If the test is expected to be run in C locale, then isn't
> < Stéphane>  (a single space before S)
> the "correct" result?

Yes it is, but it's also the expected result for POSIX_BUILTINS if run
in a different locale.


  parent reply	other threads:[~2022-03-22 21:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 16:33 Vincent Lefevre
2022-03-15 16:53 ` Mikael Magnusson
2022-03-16 15:30   ` Jun. T
2022-03-22  3:32     ` Jun T
2022-03-22 13:03       ` Vincent Lefevre
2022-03-22 21:04       ` Bart Schaefer [this message]
2022-03-23  2:26         ` Vincent Lefevre
2022-03-23 10:38           ` Stephane Chazelas
2022-03-23 16:17             ` Vincent Lefevre
2022-03-23  7:14         ` Jun T
2022-03-29  9:10           ` Jun T
2022-03-29  9:00     ` Jun T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7baJiXR1MJy00VfeHDymzK7q-xXQXL1TbeeJ0RAW1dV9A@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).