From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Test failures in --disable-multibyte
Date: Tue, 31 Dec 2019 18:39:34 +0000 [thread overview]
Message-ID: <20191231183934.evojovmj7r5bwjnl@tarpaulin.shahaf.local2> (raw)
While looking into workers/45164 (${(S)%%*}) I found that igetmatch() had two
implementations, depending on whether multibyte was enabled. I wanted to test
both codepaths, so I built clean master with --disable-multibyte and ran the
test suite and got several failures (see below). Some of the failures are
probably bugs in the tests, not in the C core, but even so, given that so many
tests fail — and failed in 5.7.1 too — I wonder whether anyone actually builds
zsh with --disable-multibyte.
The --enable-multibyte flag was added to configure in 2005, and hasn't changed
much since. The functions that configure checks for when deciding whether to
--enable-multibyte are all in POSIX.1-2001, and all but one of them (wcwidth())
are also in C99.
In the circumstances, I wonder if we should just make those functions a hard
dependency and remove the --disable-multibyte (#ifndef MULTIBYTE_SUPPORT)
codepaths entirely.
Thoughts?
Cheers,
Daniel
[[[
./Test/A03quoting.ztst: starting.
--- /tmp/zsh.ztst.15381/ztst.out 2019-12-31 18:07:13.215429795 +0000
+++ /tmp/zsh.ztst.15381/ztst.tout 2019-12-31 18:07:13.215429795 +0000
@@ -1 +1,3 @@
-$'one\\two\n\'buckle\'\tmy\\shoe\n'
+'one\two
+'\''buckle'\'' my\shoe
+'
Test ./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
./Test/B02typeset.ztst: starting.
--- /tmp/zsh.ztst.22994/ztst.out 2019-12-31 18:07:24.467350785 +0000
+++ /tmp/zsh.ztst.22994/ztst.tout 2019-12-31 18:07:24.467350785 +0000
@@ -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 ./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
./Test/B03print.ztst: starting.
--- /tmp/zsh.ztst.23078/ztst.out 2019-12-31 18:07:25.019346909 +0000
+++ /tmp/zsh.ztst.23078/ztst.tout 2019-12-31 18:07:25.023346880 +0000
@@ -1,2 +1,2 @@
typeset -g foo='once more'
-typeset -g foo=$'into\C-@the-breach\C-@-'
+typeset -g foo=intothe-breach-
Test ./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
./Test/D01prompt.ztst: starting.
--- /tmp/zsh.ztst.24994/ztst.out 2019-12-31 18:07:42.087227059 +0000
+++ /tmp/zsh.ztst.24994/ztst.tout 2019-12-31 18:07:42.091227031 +0000
@@ -1 +1 @@
-
+V
Test ./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
./Test/D04parameter.ztst: starting.
--- /tmp/zsh.ztst.25437/ztst.out 2019-12-31 18:07:43.699215739 +0000
+++ /tmp/zsh.ztst.25437/ztst.tout 2019-12-31 18:07:43.703215711 +0000
@@ -1 +1 @@
-^?^@
+\C-?\C-@
Test ./Test/D04parameter.ztst failed: output differs from expected as shown above for:
foo=$'\x7f\x00'
print -r -- ${(V)foo}
Was testing: ${(V)...}
./Test/V09datetime.ztst: starting.
--- /tmp/zsh.ztst.27420/ztst.out 2019-12-31 18:07:49.207177063 +0000
+++ /tmp/zsh.ztst.27420/ztst.tout 2019-12-31 18:07:49.207177063 +0000
@@ -1 +1 @@
-1973^@03^@03
+1973\C-@03\C-@03
Test ./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
./Test/V10private.ztst: starting.
Test ./Test/V10private.ztst failed: bad status 1, expected 0 from:
if (( UID )); then
ZTST_verbose=0 $ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh private.TMP/B02
else
ZTST_skip="cannot re-run typeset tests when tests run as superuser"
fi
Was testing: typeset still works with zsh/param/private module loaded
**************************************
43 successful test scripts, 7 failures, 3 skipped
**************************************
]]]
next reply other threads:[~2019-12-31 18:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-31 18:39 Daniel Shahaf [this message]
2019-12-31 19:46 ` Peter Stephenson
2020-01-01 13:44 ` Daniel Shahaf
2020-01-01 18:01 ` Peter Stephenson
2020-01-02 11:30 ` Daniel Shahaf
2020-01-03 10:15 ` Peter Stephenson
2020-01-03 20:11 ` [PATCH] Make --disable-multibyte warn, since the test suite fails in that configuration. (was: Re: Test failures in --disable-multibyte) Daniel Shahaf
2020-01-05 18:20 ` Peter Stephenson
2020-01-05 19:13 ` Daniel Shahaf
2020-01-06 9:44 ` Peter Stephenson
2019-12-31 20:23 ` Test failures in --disable-multibyte 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=20191231183934.evojovmj7r5bwjnl@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--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).