zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@zsh.org
Subject: Re: Test ./E03posix.ztst was expected to fail, but passed.
Date: Tue, 15 Mar 2022 17:53:51 +0100	[thread overview]
Message-ID: <CAHYJk3RLBkXmQx3NbTOGK=C71uXBWGGCL2tycEHULVDr+bQ2Hg@mail.gmail.com> (raw)
In-Reply-To: <20220315163347.GA617047@zira.vinc17.org>

On 3/15/22, Vincent Lefevre <vincent@vinc17.net> wrote:
> With the git repository on Debian/unstable:
>
> [...]
> ./E03posix.ztst: starting.
> Test ./E03posix.ztst was expected to fail, but passed.
> Was testing: Width of %s is computed in bytes not characters
> ./E03posix.ztst: test XPassed.
> The following may (or may not) help identifying the cause:
>   This is considered a bugfix in zsh
> [...]
> **************************************
> 60 successful test scripts, 1 failure, 3 skipped
> **************************************
>
> I don't know the current status... Has this been discussed in the
> austin-group list?
>
> Note that "wc" has 2 versions (-c for characters, -m for bytes)
> because each of them may be useful. I would expect something
> similar for "printf".

Noticed and discussed a bit on IRC the other week/month (sorry for
unedited irc log)

19:16 <Mikachu> oh speaking of tests, i have this in master
19:16 <Mikachu> Test ./E03posix.ztst was expected to fail, but passed.
19:16 <Mikachu> Was testing: Width of %s is computed in bytes not characters
19:16 <Mikachu> ./E03posix.ztst: test XPassed.
19:16 <Mikachu> The following may (or may not) help identifying the cause:
19:16 <Mikachu>   This is considered a bugfix in zsh
19:16 <Mikachu> was this fixed and someone forgot to remove xfail?
19:16 <Mikachu> or is my system magical
19:19 <danielsh> not sure
19:20 <danielsh> what does bin_printf do with 's'?
19:24 <Mikachu> also not sure
19:24 <Mikachu> if i replace two characters with a single ま it
misaligns for me though so no idea what's going on
19:24 <Mikachu> (3 bytes, 2 cells wide)
19:24 <danielsh> one more thing
19:24 <danielsh> I tried the printf manually, outside the test suite
19:25 <danielsh> prints the expected result
19:25 <danielsh> I run the test.  passes.  (= failed as expected)
19:25 <Mikachu> does it fail as expected in the suite for you
19:25 <Mikachu> ah
19:25 <Mikachu> maybe it only sets specific LC vars
19:26 <Mikachu> with LC_ALL=C it works
19:26 <Mikachu> but also wouldn't consider it a bug in this case
19:26 <Mikachu> hmm, also with LC_ALL=sv_SE.UTF-8
19:26 <Mikachu> but my LC_CTYPE is set to that, and LC_ALL is unset
19:26 <Mikachu> confusion
19:26 <danielsh> LC_ALL=C gives me a single space.  which is reasonable
19:27 <Mikachu> oh these are explicitly run with sh emulation too
19:27 <danielsh> the tests run force some locales but not others
19:28 <danielsh> oh forgot that
19:28 <danielsh> still produces expected output interactively
19:28 <danielsh> try running 'locale' in the test and removing the 'f'
flag so we see what locale it runs as ?
19:29 <Mikachu> i'm very confused by this test, when i edit the
command, it doesn't change the result of the test, but if i remove the
whole line it complains about a syntax error, so i AM editing the
right file...
19:29 <danielsh> the test has the 'f' flag
19:29 <Mikachu> oh right
19:30 <Mikachu> it has my locale except LANG=C which is irrelevant
19:31 <danielsh> my locale is C.UTF-8 (mostly) and I get plain C instead
19:31 <danielsh> I wonder if the test should move to D07multibyte
19:32 <danielsh> yeah it passes in D07 without f
19:33 <Mikachu> still fails with a doublewidth japanese char though
19:33 <Mikachu> very strange...
19:34 <Mikachu> anyway, i guess it's not an urgent issue then
19:35 <danielsh> with \'e and Japanese I get three spaces
19:35 <danielsh> but in the test and interactively
19:35 <danielsh> should still move the test though?
19:35 <danielsh> or figure what sets the locale to C
19:36 <danielsh> oh fun ztst.zsh:27-31
19:38 <Mikachu> i don't get why i get different results when LANG is
set to C, LANG isn't used since all my LC_* vars are set
19:38 <danielsh> in D07 ?
19:39 <danielsh> or in E03 ?
19:39 <Mikachu> in E03
19:40 <danielsh> so with LANG=C it fails as expected and with LANG
unset it xpasses, right ?
19:41 <Mikachu> well, the only difference i could spot in the locale
output was LANG, i didn't try unsetting it to see if that affected
it...
19:41 <phy1729> Seems more consistent to  unset $parameters[(I)LC_*]
19:41 <danielsh> the modload may not be available
19:41 <Mikachu> LANG *should* have no effect
19:41 <danielsh> you remember that 'locale' output uses "" specially ?
19:41 <Mikachu> just set LC_ALL
19:41 <Mikachu> yeah
19:41 <phy1729> It's loaded on L44
19:42 <danielsh> L44 of?
19:42 <phy1729> Test/ztst.zsh
19:42 <danielsh> line 43 is wrong though
19:42 <danielsh> you would know :)
19:43 <phy1729> Yes but if no one has complained yet that
zsh/parameter is required, I say keep it :)
19:44 <danielsh> but how will we port zsh to abacuses?
19:44 <Mikachu> we can port zsh to other systems without requiring the
full test suite to be available


-- 
Mikael Magnusson


  reply	other threads:[~2022-03-15 16:54 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 [this message]
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
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='CAHYJk3RLBkXmQx3NbTOGK=C71uXBWGGCL2tycEHULVDr+bQ2Hg@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --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).