help / color / mirror / code / Atom feed
From: Jun. T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: Test ./E03posix.ztst was expected to fail, but passed.
Date: Thu, 17 Mar 2022 00:30:15 +0900	[thread overview]
Message-ID: <082447B3-C6A4-44A1-A3D3-7FD89D707480@kba.biglobe.ne.jp> (raw)
In-Reply-To: <CAHYJk3RLBkXmQx3NbTOGK=C71uXBWGGCL2tycEHULVDr+bQ2Hg@mail.gmail.com>

> 2022/03/16 1:53, Mikael Magnusson <mikachu@gmail.com> wrote:
> On 3/15/22, Vincent Lefevre <vincent@vinc17.net> wrote:
>> Test ./E03posix.ztst was expected to fail, but passed.
>> Was testing: Width of %s is computed in bytes not characters
>> ./E03posix.ztst: test XPassed.
>> I don't know the current status... Has this been discussed in the
>> austin-group list?
> Noticed and discussed a bit on IRC the other week/month (sorry for
> unedited irc log)
> 19:26 <Mikachu> but my LC_CTYPE is set to that, and LC_ALL is unset

Please try the following patch.

The patch for E03posix.ztst may not be necessary for fixing the
current problem, but I think it is always safer to use 'zsh -f'.

diff --git a/Test/E03posix.ztst b/Test/E03posix.ztst
index b191199ad..9695777f6 100644
--- a/Test/E03posix.ztst
+++ b/Test/E03posix.ztst
@@ -125,39 +125,39 @@
 F:POSIX requires a solitary "-" to be a plain argument
-  ARGV0=sh $ZTST_testdir/../Src/zsh -c 'foreach() { true; }'
+  ARGV0=sh $ZTST_testdir/../Src/zsh -fc 'foreach() { true; }'
 -f:"foreach" is not a reserved word
-  ARGV0=sh $ZTST_testdir/../Src/zsh -c 'end() { true; }
+  ARGV0=sh $ZTST_testdir/../Src/zsh -fc 'end() { true; }
 -f:"end" is not a reserved word
-  a='a:b:' ARGV0=sh $ZTST_testdir/../Src/zsh -c 'IFS=:; printf "<%s>\n" $a'
+  a='a:b:' ARGV0=sh $ZTST_testdir/../Src/zsh -fc 'IFS=:; printf "<%s>\n" $a'
 0f:IFS is a separator, not a delimiter
-  a=$'\ra\r\rb' ARGV0=sh $ZTST_testdir/../Src/zsh -c 'IFS=:; printf "<%s>\n" $a'
+  a=$'\ra\r\rb' ARGV0=sh $ZTST_testdir/../Src/zsh -fc 'IFS=:; printf "<%s>\n" $a'
 0f:All whitespace characters are "IFS whitespace"
 F:isspace('\r') is true so \r should behave like space, \t, \n
 F:This may also need to apply to multibyte whitespace
-  ARGV0=sh $ZTST_testdir/../Src/zsh -c 'IFS=2; printf "<%s>\n" $((11*11))'
+  ARGV0=sh $ZTST_testdir/../Src/zsh -fc 'IFS=2; printf "<%s>\n" $((11*11))'
 0f:IFS applies to math results (numbers treated as strings)
-  ARGV0=sh $ZTST_testdir/../Src/zsh -c 'inf=42; echo $((inf))'
+  ARGV0=sh $ZTST_testdir/../Src/zsh -fc 'inf=42; echo $((inf))'
 0:All identifiers are variable references in POSIX arithmetic
 F:POSIX has neither math functions nor floating point
-  ARGV0=sh $ZTST_testdir/../Src/zsh -c 'EUID=10; echo "$EUID"'
+  ARGV0=sh $ZTST_testdir/../Src/zsh -fc 'EUID=10; echo "$EUID"'
 -f:EUID is not a special variable
-  ARGV0=sh $ZTST_testdir/../Src/zsh -c "printf '<%10s>\n' St$'\M-C\M-)'phane"
+  ARGV0=sh $ZTST_testdir/../Src/zsh -fc "printf '<%10s>\n' St$'\M-C\M-)'phane"
 0f:Width of %s is computed in bytes not characters
 F:This is considered a bugfix in zsh
 ><  Stéphane>
diff --git a/Test/ztst.zsh b/Test/ztst.zsh
index a59c06dcf..43f8ed730 100755
--- a/Test/ztst.zsh
+++ b/Test/ztst.zsh
@@ -25,6 +25,7 @@ emulate -R zsh
 # Ensure the locale does not screw up sorting.  Don't supply a locale
 # unless there's one set, to minimise problems.
 [[ -n $LC_ALL ]] && LC_ALL=C
+[[ -n $LC_CTYPE ]] && LC_CTYPE=C

  reply	other threads:[~2022-03-16 15:30 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 [this message]
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:

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

  git send-email \
    --in-reply-to=082447B3-C6A4-44A1-A3D3-7FD89D707480@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \


* 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


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).