From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 5833 invoked from network); 12 Mar 2020 17:32:31 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from unknown (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTP; 12 Mar 2020 17:32:31 -0000 Received: (qmail 26619 invoked by alias); 12 Mar 2020 17:32:18 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45537 Received: (qmail 20211 invoked by uid 1010); 12 Mar 2020 17:32:18 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt1-f182.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25744. spamassassin: 3.4.2. Clear:RC:0(209.85.160.182):SA:0(-1.9/5.0):. Processed in 3.722658 secs); 12 Mar 2020 17:32:18 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.160.182 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tFCBwRDp8sfx2weZNQYdPTY2MfcAKWUQ9PKYqO5Ml/U=; b=bwbCvgKGkahodGV2XTEnTDHNzLYawYZNsuS5Y2FppSh8nZAdKCgO018Sp4OGW74o4v 5a1O6sNFLUUlFn7/HoljyXUYbzrDiWB58B8/e2NOO4TisqvSiskqiknc5gsjXOnAyplI 3tfQCmFeNGkn4qx4t+KqoItyYLnGgo2m+8BgnmOLNfGJ37jJyzvLo45fTNSmSsUGryHB kWrRn2Xl7Hj7j6OHgLgzX3yEroD4XQ//YzvSerhXglyEHJ5Q7F87tf0AFAvmLRzYN156 VtAGkdcx6fiCkiMpEbj0+TnR3aDEEC1AB9UDjeuNC3FFOzRc+hkfFDU/Mc/jGADbOWTO hWOQ== X-Gm-Message-State: ANhLgQ0aYd7m50OaDA7a4+uiEoeVVgeeBVIomOJYV0TTE5NiFlmf4mpZ j7NvBaqIHUBOB/jmaczc2HQmsZjpyN4= X-Google-Smtp-Source: ADFU+vuO1qKdQETeeR6I5BUBN7vaYoL6BZ9EKP8VQJj6tUqPf0KrOXlzfbAnlrqXe2O0ZY+B9EuKmg== X-Received: by 2002:ac8:8d6:: with SMTP id y22mr8090019qth.85.1584034299789; Thu, 12 Mar 2020 10:31:39 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [BUG] E02 test failure / ztst *> issue From: dana In-Reply-To: Date: Thu, 12 Mar 2020 12:31:37 -0500 Cc: Zsh hackers list Content-Transfer-Encoding: quoted-printable Message-Id: <36587C4A-0329-40D0-8B03-549607985704@dana.is> References: To: Jun T X-Mailer: Apple Mail (2.3445.104.11) On 11 Mar 2020, at 21:37, Jun T wrote: > I noticed this on macOS few days ago or so, and was testing on other = BSDs, > and yes, the test fails (at least) on Free/Net/Open BSDs. It turned = out > that the problem is in zsh itself; a patch is at the end of this post. Oh, i'd just assumed it was a normal platform/locale difference. On Mojave, your patch fixes the test for me only if i manually set = LC_CTYPE or LC_ALL to C when running `make check` =E2=80=94 which didn't have any = effect before, so it is definitely an improvement. If i run it normally (where i have LC_CTYPE=3Den_GB.UTF-8), it still fails in the same way. We could set LC_CTYPE=3DC in ztst, but that'd cause problems for some of = the multi-byte tests. So should we just set it for this one test? If i = combine this patch with yours, everything passes for me. dana diff --git a/Test/E02xtrace.ztst b/Test/E02xtrace.ztst index a5a7bc55c..77088001d 100644 --- a/Test/E02xtrace.ztst +++ b/Test/E02xtrace.ztst @@ -147,22 +147,25 @@ ?+(anon):0> true ?+fn:0> gn =20 - test_cases=3D( - f # baseline - foo-bar # Dash - =E3=83=8C # Meta (the UTF-8 representation of this = character has an 0x83 byte) - \$\'ba\\0z\' # Nul, escaped as though by ${(qqqq)} + ( + LC_ALL=3DC # Make `which` output consistent + test_cases=3D( + f # baseline + foo-bar # Dash + =E3=83=8C # Meta (the UTF-8 representation of this = character has an 0x83 byte) + \$\'ba\\0z\' # Nul, escaped as though by ${(qqqq)} + ) + for 1 in "$test_cases[@]"; do + eval " + ${1}() { + ${1}() { echo inner } + } + functions -T ${1} + ${1} + which ${1} + " + done ) - for 1 in "$test_cases[@]"; do - eval " - ${1}() { - ${1}() { echo inner } - } - functions -T ${1} - ${1} - which ${1} - " - done 0:a function that redefines itself preserves tracing >f () { > # traced