Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Test ./E03posix.ztst was expected to fail, but passed.



On Mon, Mar 21, 2022 at 8:33 PM Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> 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.




Messages sorted by: Reverse Date, Date, Thread, Author