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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15409 invoked from network); 23 Sep 2022 17:15:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Sep 2022 17:15:06 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1663953306; b=EhA3Kq88D2yH/YgE06es9j1HQvc7CgCpTC5Wtdhwe2PhgGTz3SZHg7lHG+zdzt+YEFN0/7bi14 z479IYr4P9FT+bPYbFXNDZUQ9mVIn80w6lgxRU+ZYyS/AtxO67pRpGVeK8vRqxN1aPpEqwnTWc JaigdbTlFVLVOpLGVmnYxCdR6790Dlebz9IziDl7F57jvAPjjCVAk3tiS1r6L6WlNRkSBRSXPe 4JCbXOyfwS9tgzpCjN4edf4cqGuVAdApPt5n2PkmHKey92q/v95UMwshRoLwAjcI+uw3BCq+IX jGMUOqEWD8oCRXm5IUK4wTJFfJrzvZdUNIjbnKJTKVR+7w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd00008-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.8; 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=1663953306; bh=PybZCfooZeYXAIv7Kj5zPYgDMF5uO+zLB7BknBPzwck=; 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=jwyJwwyFsBR+P2daxi/ZUFsUtUl1CB6PqKvUmGi1QrMbFyPGUjhdfDtrjd/WiIqFg/XOMT2H6c QUlo2YdF4eiLmq6SF42HowwkZCDhhJV4fXFHb6rmwDadZjyyozY5G+6b2UW2TMcv+ZrGIJYrlo mOFYKwTDGLOsSktKv1OWwwWFyRcKHWoyS7ePTSs7ZXPMcB12w/sMHkEjusczEHqPdyZS1Z3tuL SWAsbndAfyvqL5TGM/WBmftoAY6hjf5f3g0mMyp2BL4HRKUtdfV2w3ZWi3AzaQJ+5FNXHt3tlU kG1FV6riXVcnWgsZJzIUD+J6UOkthIQTaewrd3wbtwKQnw==; 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=gawPbE18YNqKNGXfS3SFdztcSCE28mfuv6rOVIl3k1k=; b=DbXvaXdjsqSOlloRzNi8wDbyf+ vcjDF3Q9+bTsU3Y5ksFDvBmfhUCcIXqY7rIaTJZQTQH9J74keukZM/XSFMwd8JQPtxTxW/EaZfj7Z FJjh8Jc4aH1ucWlqISP02yJqtaxOEaM7ESqwyQkcZdD3g5DoFmVnIu4RDuS/edfRmzUN+VqEJzRtQ Ury1ddOijb0PV/Bcd+8K4wyXfMWXe/FS55l+ELqz4PgVKKdBiAFT6eYl2edaQKsFwlr+KYEF2JeNd BxFlBNM37rH7ZzCw/tIWDuXgkuU13rzoeho/Q3hbystm+ZEwNmJgEAGf+qLmyM84cgX9iuzMtUrOK CiTMR+pA==; Received: from authenticated user by zero.zsh.org with local id 1obmGU-000Mrz-IU; Fri, 23 Sep 2022 17:15:02 +0000 Authentication-Results: zsh.org; iprev=pass (snd00008-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.8; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd00008-bg.im.kddi.ne.jp ([27.86.113.8]:5857 helo=dfmta0020.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1obmGB-000MWY-Km; Fri, 23 Sep 2022 17:14:45 +0000 Received: from mail.biglobe.ne.jp by omta0020.biglobe.ne.jp with ESMTP id <20220923171436688.CJYR.76285.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Sat, 24 Sep 2022 02:14:36 +0900 From: "Jun. T" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: Deprecation of egrep Date: Sat, 24 Sep 2022 02:14:35 +0900 References: <8D43BA5A-84FD-4737-8009-059430DD039E@kba.biglobe.ne.jp> <5df78024-40cc-4919-9610-32fe7c761851@www.fastmail.com> <46F0A32F-93D2-4E67-9C72-2DC924AC21FD@kba.biglobe.ne.jp> <551112370.534185.1662979770948@mail.virginmedia.com> To: zsh-workers@zsh.org In-Reply-To: Message-Id: <912F4E5D-5EBD-45D6-B7BC-0F93CD12C657@kba.biglobe.ne.jp> X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 50662 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/09/13 13:33, Jun T wrote: > > In the path below, I moved the repeated code for finding UTF-8 locale > to a single function in ztst.zsh. The only other use of egrep is > in E01options.zsh. Sorry, with this patch D07 fails if users explicitly export LC_CTYPE=C when running the test. Unsetting LC_\* in ZTST_find_UTF8() is not sufficient. I think we can simply unset LC_\* in ztst.zsh for ALL the tests and rely only on LANG. diff --git a/Test/ztst.zsh b/Test/ztst.zsh index d95b726e7..ea1b016d5 100755 --- a/Test/ztst.zsh +++ b/Test/ztst.zsh @@ -25,23 +25,13 @@ # still not be good enough. Maybe we should trick it somehow. emulate -R zsh -# Ensure the locale does not screw up sorting. Don't supply a locale -# unless there's one set, to minimise problems. -[[ -n $LC_ALL ]] && LC_ALL=C -[[ -n $LC_CTYPE ]] && LC_CTYPE=C -[[ -n $LC_COLLATE ]] && LC_COLLATE=C -[[ -n $LC_NUMERIC ]] && LC_NUMERIC=C -[[ -n $LC_MESSAGES ]] && LC_MESSAGES=C -[[ -n $LANG ]] && LANG=C -# Test file may (or may not) set LANG to other locales. In either case, -# LANG must be passed to child zsh. -export LANG +# By default tests are run in C locale. LANG must be passed to child zsh. +unset -m LC_\* +export LANG=C # find UTF-8 locale ZTST_find_UTF8 () { setopt multibyte - # Don't let LC_* override our choice of locale. - unset -m LC_\* local langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 ${(M)$(locale -a 2>/dev/null):#*.(utf8|UTF-8)}) for LANG in $langs; do