Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Avoid \e in C code; building on Solaris 11
- X-seq: zsh-workers 52393
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: Avoid \e in C code; building on Solaris 11
- Date: Sun, 10 Dec 2023 00:04:46 +0100
- Archived-at: <https://zsh.org/workers/52393>
- In-reply-to: <CAH+w=7Yx4CcaZt2qFG_69mtrJRQT=gWFoajb5aMA5EQV5AUATw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <50885-1702060132.779123@YSiF.CgC_.vGLi> <CAH+w=7ZuvPdqnTVvpZmhW=khZekc6DiTxM6ai6Hi0cmDnfNh5A@mail.gmail.com> <CAH+w=7Yx4CcaZt2qFG_69mtrJRQT=gWFoajb5aMA5EQV5AUATw@mail.gmail.com>
Bart Schaefer wrote:
> On Fri, Dec 8, 2023 at 2:03 PM Bart Schaefer <[1]schaefer@xxxxxxxxxxxxxxxx>
> wrote:
>
> The test is confirming that zexpandtabs() doesn't infinite-loop on broken
> multibyte input which might include nul bytes. Could replace the "tr" with
> something else.
>
>
> E.g. (not bothering to worry about gmail wrapping here)
That works. Thanks
Any objection to the following so that manual hacks are not needed to
run the test cases. This is just checking $OSTYPE for solairs.
Incidentally, I tried whether the new ${ print -x4 $foo } form might
also work here and it results in an extra trailing blank line in each
case. Is that difference expected?
Oliver
diff --git a/Test/ztst.zsh b/Test/ztst.zsh
index ea1b016d5..1d05baddf 100755
--- a/Test/ztst.zsh
+++ b/Test/ztst.zsh
@@ -326,6 +326,7 @@ ZTST_diff() {
emulate -L zsh
setopt extendedglob
+ local -a diff_arg
local diff_out
integer diff_pat diff_ret
@@ -342,6 +343,7 @@ ZTST_diff() {
;;
esac
shift
+ [[ $OSTYPE != solaris* ]] && diff_arg=( -a )
if (( diff_pat )); then
local -a diff_lines1 diff_lines2
@@ -382,7 +384,7 @@ ZTST_diff() {
diff_ret=1
fi
else
- diff_out=$(diff -a "$@")
+ diff_out=$(diff $diff_arg "$@")
diff_ret="$?"
if [[ "$diff_ret" != "0" ]]; then
print -r -- "$diff_out"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author