zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: Avoid \e in C code; building on Solaris 11
Date: Sun, 10 Dec 2023 00:04:46 +0100	[thread overview]
Message-ID: <18413-1702163086.421549@hzMt.-XQg.ucw2> (raw)
In-Reply-To: <CAH+w=7Yx4CcaZt2qFG_69mtrJRQT=gWFoajb5aMA5EQV5AUATw@mail.gmail.com>

Bart Schaefer wrote:
> On Fri, Dec 8, 2023 at 2:03 PM Bart Schaefer <[1]schaefer@brasslantern.com>
> 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"


  reply	other threads:[~2023-12-09 23:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-08 18:28 Oliver Kiddle
2023-12-08 22:03 ` Bart Schaefer
2023-12-08 22:15   ` Bart Schaefer
2023-12-09 23:04     ` Oliver Kiddle [this message]
2023-12-10  0:29       ` Bart Schaefer
2023-12-09 22:41   ` Oliver Kiddle
2023-12-09 23:43   ` Oliver Kiddle
2023-12-10  0:33     ` 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=18413-1702163086.421549@hzMt.-XQg.ucw2 \
    --to=opk@zsh.org \
    --cc=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).