From: dana <dana@dana.is>
To: Jun T <takimoto-j@kba.biglobe.ne.jp>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [BUG] E02 test failure / ztst *> issue
Date: Thu, 12 Mar 2020 12:31:37 -0500 [thread overview]
Message-ID: <36587C4A-0329-40D0-8B03-549607985704@dana.is> (raw)
In-Reply-To: <E8D3FB22-7499-4710-905D-48A18FEC5D2E@kba.biglobe.ne.jp>
On 11 Mar 2020, at 21:37, Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:
> I noticed this on macOS few days ago or so, and was testing on other BSDs,
> and yes, the test fails (at least) on Free/Net/Open BSDs. It turned out
> that the problem is in zsh itself; a patch is at the end of this post.
Oh, i'd just assumed it was a normal platform/locale difference.
On Mojave, your patch fixes the test for me only if i manually set LC_CTYPE or
LC_ALL to C when running `make check` — which didn't have any effect before,
so it is definitely an improvement. If i run it normally (where i have
LC_CTYPE=en_GB.UTF-8), it still fails in the same way.
We could set LC_CTYPE=C in ztst, but that'd cause problems for some of the
multi-byte tests. So should we just set it for this one test? If i combine
this patch with yours, everything passes for me.
dana
diff --git a/Test/E02xtrace.ztst b/Test/E02xtrace.ztst
index a5a7bc55c..77088001d 100644
--- a/Test/E02xtrace.ztst
+++ b/Test/E02xtrace.ztst
@@ -147,22 +147,25 @@
?+(anon):0> true
?+fn:0> gn
- test_cases=(
- f # baseline
- foo-bar # Dash
- ヌ # Meta (the UTF-8 representation of this character has an 0x83 byte)
- \$\'ba\\0z\' # Nul, escaped as though by ${(qqqq)}
+ (
+ LC_ALL=C # Make `which` output consistent
+ test_cases=(
+ f # baseline
+ foo-bar # Dash
+ ヌ # Meta (the UTF-8 representation of this character has an 0x83 byte)
+ \$\'ba\\0z\' # Nul, escaped as though by ${(qqqq)}
+ )
+ for 1 in "$test_cases[@]"; do
+ eval "
+ ${1}() {
+ ${1}() { echo inner }
+ }
+ functions -T ${1}
+ ${1}
+ which ${1}
+ "
+ done
)
- for 1 in "$test_cases[@]"; do
- eval "
- ${1}() {
- ${1}() { echo inner }
- }
- functions -T ${1}
- ${1}
- which ${1}
- "
- done
0:a function that redefines itself preserves tracing
>f () {
> # traced
next prev parent reply other threads:[~2020-03-12 17:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-11 21:15 dana
2020-03-12 2:37 ` Jun T
2020-03-12 17:31 ` dana [this message]
2020-03-12 17:36 ` Peter Stephenson
2020-03-13 10:08 ` Jun T
2020-03-13 13:52 ` dana
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=36587C4A-0329-40D0-8B03-549607985704@dana.is \
--to=dana@dana.is \
--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).