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=-2.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 32593 invoked from network); 1 Apr 2021 05:21:22 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Apr 2021 05:21:22 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1617254482; b=eUL46mXxmtrPGHirCJaO7uoQi3u/wogDCFG7UnwOZtnUVoMLc0yV0inbSKEKNCzOBgIfO4n1/J Atgvn/yrxge+3VsdO4NM0H7mA66ZUdUazk+sAP1UnjR9disuPrkHHa1nMrEJuLwJIR5A7gduNr ipuHbTWpv2UWer3Dr3i7sb9Q1dQpJZcmIZzIk7OixQ+xR1v4S9dI9tjbdnMZ2Iyv6g56C5/WKb ePBCCemKqpFWamBYiSAP/WPRscWvMZDdT9DIa42T2e7TafkjAhT689XKg/JlPlQ0tSMPloO/ID yrZhMs3NZm7ArHErRk7AAnu8yiq54S/hiBy+CFRJQQ+zdQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd00001-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.1; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1617254482; bh=g6ceXhJFZXOh3CuVvRcjT6qCm+CmWD/a+/2iYX4fHgQ=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Message-ID:In-Reply-To:To:References:Date:Subject: MIME-Version:Content-Transfer-Encoding:Content-Type:From:DKIM-Signature; b=ZTSPtIceeCHDYawfL7w0zjkg4X5V/P4qu23b3Fbe32B5ViQDB9BC23S4K6mi/q5Ou5mF9sB66n 4dU0skatZOIbFUH9P4NW79W4OVKVzXsAPfywXKrbLFyM+oCofUJIk4LN/SrzKDk5x1zUpd6hlh Yt3t1zmK2iObSuvyQcECgcD6cPFPOoz7ki+ucm9nmhAItmWMiK/yLj29PDYsOE1/t1xY73yygL 6vAtkk7cSswgIZbNlNUsjDHP22fXYeZLVuzEZS+oH0z3Pj3lQzujikloaaZ15yKWrAOOB+xGWc 5oxRIo2YRVRYhlsUfPN7ENGuUayBFVWSv0v1ovphVMg4Lw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-Id:In-Reply-To:To:References: Date:Subject:Mime-Version:Content-Transfer-Encoding:Content-Type:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=9IYPe9gybKoslSU8/7rii5/DFRGfhUrWu5RA3OVgf5Q=; b=nQ/Ud7X9s5Qpw8+ccMXKpwziTM QWGTFlSYVnJ4RqVzGsRQaORpsxigCSal8atrRUG2sxDHYVQCpCvlRCn27nYkYEpIKlgjpeJ+q72T4 C6ocfHhbH8lgSAkFl1EdjRX5zGhkHGt5Kf2k3U/qFBnIC2uJtEuZRQ/tXtP8C2TCeyJqQv9XMwMxN 4GSjPenEogwDWUPJamd55ypmNod2vAbMugfIzD9zYlmVVuRi/Bl3onKJw51OGsLMT5BbFZ1eIvXyx jDuIrY7pQKdTmdRQtisLjN85vwi10FTzELCoJUNa2+Ceinu/r4QnWSP7e4y7j6F4g7HPkcZJQACsH r31a9Jzw==; Received: from authenticated user by zero.zsh.org with local id 1lRplh-0001xX-Em; Thu, 01 Apr 2021 05:21:21 +0000 Authentication-Results: zsh.org; iprev=pass (snd00001-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.1; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd00001-bg.im.kddi.ne.jp ([27.86.113.1]:54499 helo=omta0013.biglobe.ne.jp) by zero.zsh.org with esmtp id 1lRplV-0001oN-4z; Thu, 01 Apr 2021 05:21:10 +0000 Received: from mail.biglobe.ne.jp by omta0013.biglobe.ne.jp with ESMTP id <20210401052106081.IALJ.47190.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Thu, 1 Apr 2021 14:21:06 +0900 From: Jun T Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: PATCH v2: 48168: Fix handling of NUL bytes in zexpandtabs multibyte version Date: Thu, 1 Apr 2021 14:21:05 +0900 References: <485a976d-bcd6-4fcc-a4cc-c4e1831e9151@www.fastmail.com> <20210320151551.29509-1-mikachu@gmail.com> To: zsh-workers@zsh.org In-Reply-To: Message-Id: <33082E1F-ACF5-4B9A-A268-C2F43B11D56D@kba.biglobe.ne.jp> X-Mailer: Apple Mail (2.3445.104.17) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 48366 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: Archived-At: The test in B03 fails on macOS and FreeBSD (and maybe on other BSDs) because 'sed' can't handle the null byte. It seems 'tr' is more portable. diff --git a/Test/B03print.ztst b/Test/B03print.ztst index 563423934..4d2cf9764 100644 --- a/Test/B03print.ztst +++ b/Test/B03print.ztst @@ -304,15 +304,16 @@ foo=$'one\ttwo\tthree\tfour\n' foo+=$'\tone\ttwo\tthree\tfour\n' foo+=$'\t\tone\t\ttwo\t\tthree\t\tfour' - print -x4 $foo - print -X4 $foo + foo+='\0' # regression test for multibyte tab expand + print -x4 $foo | tr '\0' Z # avoid raw nul byte in expected output below + print -X4 $foo | tr '\0' Z 0:Tab expansion by print >one two three four > one two three four -> one two three four +> one two three fourZ >one two three four > one two three four -> one two three four +> one two three fourZ unset foo print -v foo once more