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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 348 invoked from network); 29 Mar 2022 09:10:26 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 29 Mar 2022 09:10:26 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1648545026; b=SEc9XfyM3DmgUNfnO0UicC9JmiNvcujjBg0HIEjBeHx9HNWB6RohpxYzgGV4zhVmRqAVrk/nMD q9oVXyrwj2GOEW2eerT1UoYEOqrJ9MThmEpnpAidHHHa6+NiG9Bcvq3jg1EHDxKpfZQoW/Pqmj smhJCsPYOcLlm2N8K7dmY/qxMId+BrMWleD2BuOdHOYFJbI8wHpXbyvBhWFRjGKj45mZGxurLU O4aQYflmo9DQ/ZjHP7kLIzP1WV7uMMXsv9+D5mLiJSG4YSEsuUtu5YesH20t4gLSoyQqzkCorK A3wC9L1WG56IJ9n5DLnnnUYrRvFFmwqw+QpOtdN9SaIz8Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd00003-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.3; 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-20210803; t=1648545026; bh=pM/Fo66ig9JxxWxgHg+kHsiOYJVFcjRKSlVfgi0euyo=; 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=J2nkVpCYG2s9OLr2aDJmJ0PwxfFY4uFMdzNSALWudbwPj41469wC77CyGY4ksJO8jYUCcuMXET LyPMw97eITrbN+WVfZcbYJYuiGHUl5IAO3n6oN+K4x2xEPLldSLADzyJiJutl5iQWSimrqMDoh y7LfF+Fd50bzpasD9dg9wSnlHPB1sSgsHVCCT/Ymec4yulmYg7eXKQK+gM6UHg0hrXEJI9cpVl R/ry7cqBNUfvK85KQCoiTygQ3aYpMuiDP91Q1ZgXiMKaH+Bkbb8l2BByyJv4KRV7PmH4s6Etg6 ggmERGbTYfs75mRaexeqtEBwfK81kvXQvmIHiI+iGEL9Fg==; 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: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=CCy+10EtckVPPZ4VjUhTOVA2gq03wWZlJa6walX2yYQ=; b=TsKUPpCP42Zyic4A0lR8H0TiRN hW+/lfvxdWodzOvrPwmpt22P6KH+tPEP8m1MoQDiPYvH9z34trmCKviMkaf5RhLjVU3+7VOu9uDm7 Be//ngqtXOoCrOSlUeIEtMkmAldqXl7dOzTiLZ7KNMvQJRAAFdY7nhuoqH1yHhouutMwFOIT3ILjm RGJ1yEiNR1u/4AuEhvI7sGNJOdDTHFOGvYvsQyT7AnPVZYv40XDqhPxRluTw2H74bCyGBJf0Z4fdE LLMIkuU9bQg8VrOUwO8nQz/1fhHLjRhiEfaS0Fcw6iEbXPOQEYl6OyMXNLtOLxkY1dP51G1aRzRkE 66u+/3Wg==; Received: from authenticated user by zero.zsh.org with local id 1nZ7rt-0001vX-IM; Tue, 29 Mar 2022 09:10:25 +0000 Authentication-Results: zsh.org; iprev=pass (snd00003-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.3; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd00003-bg.im.kddi.ne.jp ([27.86.113.3]:38883 helo=dfmta0014.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nZ7rZ-0001aN-8b; Tue, 29 Mar 2022 09:10:08 +0000 Received: from mail.biglobe.ne.jp by omta0014.biglobe.ne.jp with ESMTP id <20220329091000347.SNT.61979.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Tue, 29 Mar 2022 18:10:00 +0900 From: Jun T Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: Test ./E03posix.ztst was expected to fail, but passed. Date: Tue, 29 Mar 2022 18:10:00 +0900 References: <20220315163347.GA617047@zira.vinc17.org> <082447B3-C6A4-44A1-A3D3-7FD89D707480@kba.biglobe.ne.jp> To: zsh-workers@zsh.org In-Reply-To: Message-Id: <06182E36-D074-4A3A-8A1E-384B8887D108@kba.biglobe.ne.jp> X-Mailer: Apple Mail (2.3445.104.21) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 49910 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: > 2022/03/23 16:14, I wrote: >=20 > If the 'expected to fail' test exists for reminding us that we are > (intentionally?) contradicting with POSIX, the test need be run under > UTF-8 locale (in D07multibyte.ztst), with >=20 >> < St=C3=A9phane> # single ' ' before 'S' In the following patch the test is moved to D07multibyte.ztst, and another test (expected to fail) is added to indicate that the precision (5 in '%7.5s') should also be computed in bytes. diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst index 7f046525a..cbd802f23 100644 --- a/Test/D07multibyte.ztst +++ b/Test/D07multibyte.ztst @@ -347,6 +347,18 @@ 0:Multibyte characters in printf widths > f=C5=91o =20 +# TODO?: POSIX requires that printf should always compute width and +# precision of '%s' conversion in bytes, while zsh computes them in +# characters if multi-byte locale is in use. + ARGV0=3Dsh $ZTST_testdir/../Src/zsh -c "printf '<%10s>\n' = St$'\M-C\M-)'phane" +0f:POSIX: width in %s should be computed in bytes, not in characters +F:This is considered a bugfix in zsh +>< St=C3=A9phane> + + ARGV0=3Dsh $ZTST_testdir/../Src/zsh -c "printf '<%7.5s>\n' = St$'\M-C\M-)'phane" +0f:POSIX: precision should also be computed in bytes, not in characers +>< St=C3=A9p> + # We ask for case-insensitive sorting here (and supply upper case # characters) so that we exercise the logic in the shell that lowers = the # case of the string for case-insensitive sorting. diff --git a/Test/E03posix.ztst b/Test/E03posix.ztst index b191199ad..caab97ab6 100644 --- a/Test/E03posix.ztst +++ b/Test/E03posix.ztst @@ -157,10 +157,5 @@ F:POSIX has neither math functions nor floating = point -f:EUID is not a special variable >10 =20 - ARGV0=3Dsh $ZTST_testdir/../Src/zsh -c "printf '<%10s>\n' = St$'\M-C\M-)'phane" -0f:Width of %s is computed in bytes not characters -F:This is considered a bugfix in zsh ->< St=C3=A9phane> - PPID=3Dfoo -f:PPID is not a readonly variable=