From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12775 invoked from network); 9 Dec 2023 23:05:21 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 9 Dec 2023 23:05:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date: Content-Transfer-Encoding:Content-ID:Content-Type:MIME-Version:Subject:To: References:From:In-reply-to:cc:Reply-To:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=jv52oFMnaSxeEKmLZu8WH1mLDPvsNFZyGlp7whmHNaM=; b=NpWX8Dxost5EggU3E1xn82qWul 4Trt8AT3kkjHVSk0h7Y/S0FOrhd9T0J/AkL6qX4xFybiK47hMNIU/YvE3Bq8TvFzZsDlZl41erFou JbnMzKnbkiRz2wyYPhixr6LfA5a/eLySJkgNoOVxFeoDUeX4yyLpcuCEq3t2jF1GPAwTw94qcjpZq IZVsVV1C2ieAADZ2SUyIs7nB6nJUEIiI50dYGkwMKNFdwLr/o1R9626BPi3qdnE0HMl6LYe8FNY+F jZ9eI3Lk9m0/8M7UP4wPqRAM3ErI3b5ZoXduk32i/+MMh2n1Za/TLMqC/mHNbjnhrmbhG8fJvRzjZ J8zzYZFQ==; Received: by zero.zsh.org with local id 1rC6Ns-000IYa-TP; Sat, 09 Dec 2023 23:05:20 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rC6NL-000IDz-AU; Sat, 09 Dec 2023 23:04:47 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1rC6NK-0004n0-Dh; Sun, 10 Dec 2023 00:04:47 +0100 cc: Zsh workers In-reply-to: From: Oliver Kiddle References: <50885-1702060132.779123@YSiF.CgC_.vGLi> To: Bart Schaefer Subject: Re: PATCH: Avoid \e in C code; building on Solaris 11 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <18412.1702163086.1@hydra> Content-Transfer-Encoding: 8bit Date: Sun, 10 Dec 2023 00:04:46 +0100 Message-ID: <18413-1702163086.421549@hzMt.-XQg.ucw2> X-Seq: 52393 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: 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"