zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Lots of test failures when --disable-multibyte
Date: Sun, 3 Apr 2022 19:03:56 -0700	[thread overview]
Message-ID: <CAH+w=7Y5-0DFcJUL2c9uvtC3Q4cKFiMaXKTewFzt6yvTEYKSvQ@mail.gmail.com> (raw)

Many seem to be because typeset fails to apply $'...' quoting to
strings with embedded metacharacters or NUL bytes, but there are
several other odd ones too.

./A03quoting.ztst: starting.
--- /tmp/zsh.ztst.150326/ztst.out    2022-04-03 18:48:09.354312275 -0700
+++ /tmp/zsh.ztst.150326/ztst.tout    2022-04-03 18:48:09.354312275 -0700
@@ -1 +1,3 @@
-$'one\\two\n\'buckle\'\tmy\\shoe\n'
+'one\two
+'\''buckle'\''    my\shoe
+'
Test ./A03quoting.ztst failed: output differs from expected as shown above for:
 foo=$'one\\two\n\'buckle\'\tmy\\shoe\n'
 print -r ${(q+)foo}
Was testing: Extended minimal quoting of quotes and backslashes
./A03quoting.ztst: test failed.

./B02typeset.ztst: starting.
--- /tmp/zsh.ztst.157742/ztst.out    2022-04-03 18:48:24.710512660 -0700
+++ /tmp/zsh.ztst.157742/ztst.tout    2022-04-03 18:48:24.714512712 -0700
@@ -1,7 +1,7 @@
 l o c a
 typeset -UT SCALAR array=( l o c a ) ''
 typeset -aT SCALAR array=( l o c a ) ''
-SCALAR=$'l\C-@o\C-@c\C-@a'
+SCALAR=loca
 array=( l o c a )
 local unique tied array SCALAR
 array local tied SCALAR array
Test ./B02typeset.ztst failed: output differs from expected as shown above for:
 typeset -T SCALAR=$'l\000o\000c\000a\000l' array $'\000'
 typeset -U SCALAR
 print $array
 typeset -p SCALAR array
 typeset -m SCALAR array
 typeset +m SCALAR array
 [[ $SCALAR == $'l\000o\000c\000a' ]]
Was testing: Tied parameters and uniquified arrays with NUL-character
as separator
./B02typeset.ztst: test failed.

./B03print.ztst: starting.
--- /tmp/zsh.ztst.157826/ztst.out    2022-04-03 18:48:26.106530878 -0700
+++ /tmp/zsh.ztst.157826/ztst.tout    2022-04-03 18:48:26.110530931 -0700
@@ -1,2 +1,2 @@
 typeset -g foo='once more'
-typeset -g foo=$'into\C-@the-breach\C-@-'
+typeset -g foo=intothe-breach-
Test ./B03print.ztst failed: output differs from expected as shown above for:
 unset foo
 print -v foo once more
 typeset -p foo
 printf -v foo "%s\0%s-" into the breach
 typeset -p foo
Was testing: print and printf into a variable
./B03print.ztst: test failed.

./D01prompt.ztst: starting.
--- /tmp/zsh.ztst.159862/ztst.out    2022-04-03 18:48:45.714786786 -0700
+++ /tmp/zsh.ztst.159862/ztst.tout    2022-04-03 18:48:45.718786838 -0700
@@ -1 +1 @@
-
+V
Test ./D01prompt.ztst failed: output differs from expected as shown above for:
  print ${(%U)Y-%(v}
Was testing: Regression test for test on empty psvar
./D01prompt.ztst: test failed.

./D04parameter.ztst: starting.
--- /tmp/zsh.ztst.160387/ztst.out       2022-04-03 18:48:48.790826935 -0700
+++ /tmp/zsh.ztst.160387/ztst.tout    2022-04-03 18:48:48.790826935 -0700
@@ -1 +1 @@
-^?^@
+\C-?\C-@
Test ./D04parameter.ztst failed: output differs from expected as shown
above for:
  foo=$'\x7f\x00'
  print -r -- ${(V)foo}
Was testing: ${(V)...}
./D04parameter.ztst: test failed.

./E02xtrace.ztst: starting.
--- /tmp/zsh.ztst.161648/ztst.out    2022-04-03 18:48:57.014934283 -0700
+++ /tmp/zsh.ztst.161648/ztst.tout    2022-04-03 18:48:57.018934335 -0700
@@ -6,11 +6,11 @@
     # traced
     echo inner
 }
-$'\M-c\M-\C-C\M-\C-L' () {
+ヌ () {
     # traced
     echo inner
 }
-$'ba\C-@z' () {
+baz () {
     # traced
     echo inner
 }
Test ./E02xtrace.ztst failed: output differs from expected as shown above for:
  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}
      LC_ALL=C which ${1}
    "
  done
Was testing: a function that redefines itself preserves tracing
./E02xtrace.ztst: test failed.

./V05styles.ztst: starting.
--- /tmp/zsh.ztst.162371/ztst.out    2022-04-03 18:49:01.322990518 -0700
+++ /tmp/zsh.ztst.162371/ztst.tout    2022-04-03 18:49:01.326990570 -0700
@@ -1 +1 @@
-zstyle $'con\C-@text' $'ke\C-@y' $'val\C-@u' e
+zstyle context key valu e
Test ./V05styles.ztst failed: output differs from expected as shown above for:
 (
  zstyle $'con\x00text' $'ke\x00y' $'val\x00u' $'e'
  a=( ${(f)"$(zstyle -L)"} )
  a=( ${(M)a:#*con*text*ke*y*val*u*e} )
  print -r -- "$a"
 )
Was testing: zstyle -L escapes the key (regression: workers/48424)
./V05styles.ztst: test failed.

./V09datetime.ztst: starting.
Test case skipped: Japanese UTF-8 locale not supported
--- /tmp/zsh.ztst.162531/ztst.out    2022-04-03 18:49:01.842997306 -0700
+++ /tmp/zsh.ztst.162531/ztst.tout    2022-04-03 18:49:01.846997358 -0700
@@ -1 +1 @@
-1973^@03^@03
+1973\C-@03\C-@03
Test ./V09datetime.ztst failed: output differs from expected as shown above for:
  print -r -- ${(V)"$(strftime $'%Y\0%m\0%d' 100000000)"}
Was testing: Embedded nulls
./V09datetime.ztst: test failed.

... and a completion test I won't quote here that failed because the
{a..z} notation didn't work for the expression
  comptesteval "typeset -a bar=({$'\\0'..$'\\C-?'})"


             reply	other threads:[~2022-04-04  2:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04  2:03 Bart Schaefer [this message]
2022-04-04 14:43 ` Peter Stephenson
2022-04-04 15:31   ` Bart Schaefer
2022-04-04 16:23     ` Peter Stephenson
2022-04-04 21:10     ` Bart Schaefer
2022-04-04 21:45       ` Bart Schaefer
2022-04-04 22:00         ` Bart Schaefer
2022-04-05 16:00           ` Bart Schaefer
2022-04-05 16:15             ` Mikael Magnusson
2022-04-05 20:29           ` Peter Stephenson
2022-04-06  3:48             ` Bart Schaefer
2022-04-06  5:32             ` ZTST_continue (was Re: Lots of test failures when --disable-multibyte) Jun T
2022-04-06 13:37               ` Peter Stephenson
2022-04-07 12:33                 ` Jun T
2022-04-07 12:34                 ` Jun T
2022-04-04 18:52 ` Lots of test failures when --disable-multibyte Bart Schaefer

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=7Y5-0DFcJUL2c9uvtC3Q4cKFiMaXKTewFzt6yvTEYKSvQ@mail.gmail.com' \
    --to=schaefer@brasslantern.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).