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 24025 invoked from network); 1 Apr 2021 04:05:34 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Apr 2021 04:05:34 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1617249934; b=gQKO0eJqFdsK3oUVIIixVI8O2eJuGHnH5RxMqtXUghn30hR+fNIE5nrPNrNzOfMvjep90EZ3iW tVuHnNeeMPZqFtzyfATMlcbMcEtLz+31KZBTi3ALdVQLlwlWnauVF7ceZiA7FtP7Ic9PR77IvO 7vjcKCcnlPN+x4Wke08ihFwY7SqjTPbe/3fBqjowZ456/YkkVY/ptlWAwNO1VLDN5QT7/9F5CG iXt+nITmDl3fF1g08xMoIKH/DFkkcUn4nuMtzKP52N7+yGMlIUCVr47uQqtG2y9fe2ep266t0k 3LGDSrC9fucgER6gXiYk/ovIhEtJWKRTezO8SBcHyFFqTA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd01012-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.28; 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=1617249934; bh=qTAFyWifjlIDqlTtwbr36M7iahJ5AzIzmbtu2IFrATg=; 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=jRxwEZXc5NNd0x7J9L9hvyniDgQK84T5/3Id0nhD+DJ97lOMtlBzwDFzArVQYP/IXQhl5qmrkk Zw/mMAMXqCzd/OJFWAq58GqL+/zJdPqLiIpA+duU5yr0i8ryv5TRbdWhBNwgvl/06ARbgfIjN2 N2G/dlQmRl30jomdFm9aV7S4BWinLLh010VlLYkdWoJecRLnEodn7918WbRH00rUXm0shhF2+h 1x0OoHusc2OWHP5lbx431csnx/czETTdsjtD4A2SMOEyHeDkIAtvle0vDojZWYXA4H+2WYSZpC z95G5xDyGyZ8hVjs2M/Yjv6j6g2skeyp7dSQq8ANpKdISw==; 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=PaPFJuyDc5IYQz2STr2xjxWAH76BqXCJUHZYCLQroXM=; b=vugjfyJBRBWYrMXfrnp+zO9IGK Gv/ARAMuOVCB1ZYe18+hl0rXCYRVQe/Ss9zQDn6OklAXTSFedc22NL5KTo+eYi2jpCv8jzV763GWK oxvhF0nmvy7EQ90JFxUZ/EldRnmezcWIsMA2trM0Yz/yAgM4UMdz0wtvpe26A44A1UUVQmuD+kUnv nHx3WgfOqxpKBZ1fNIEKNrR6JWF/Qv717Hg0AjzRmkx44LOnaT4z4/bMWvR6b/ff3FynTEw9TehQr nfFwblpxsKusWAHSRGAB3dw1P8gLJsRc8OxU+5FChAvNZa1KuAQwr6MWzdHNHxXkgCtoUZkJ5sJ2m MWAxcvDw==; Received: from authenticated user by zero.zsh.org with local id 1lRoaJ-000P7M-3x; Thu, 01 Apr 2021 04:05:31 +0000 Authentication-Results: zsh.org; iprev=pass (snd01012-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.28; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd01012-bg.im.kddi.ne.jp ([27.86.113.28]:49184 helo=omta1003.biglobe.ne.jp) by zero.zsh.org with esmtp id 1lRoa4-000Oxx-DG; Thu, 01 Apr 2021 04:05:18 +0000 Received: from mail.biglobe.ne.jp by omta1003.biglobe.ne.jp with ESMTP id <20210401040510664.CXDQ.14840.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Thu, 1 Apr 2021 13:05:10 +0900 From: Jun T Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: Y01 Test Failure on Arch Date: Thu, 1 Apr 2021 13:05:10 +0900 References: To: zsh-workers@zsh.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3445.104.17) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 48363 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: > 2021/03/31 22:40, Vin Shelton wrote: >=20 > Building from the latest sources on endeavouros (Arch): (snip) > Test ../../../src/zsh-2021-03-31/Test/Y01completion.ztst failed: = output differs from expected as shown above for: > comptest $': *\t\t\t\t\t\t\t' > Was testing: _expand shows file types Same in Ubuntu, Fedora and macOS. It seems we need to call complete-word instead of expand-or-complete, and include _expand in the 'completer' style. The patch below works (all the test pass with the patch), but I'm not sure this is the best solution. In the patch I simply replaced expand-or-complete by complete-word in the function expand-or-complete-with-report() defined in comptest. (Do we also need to change the function name etc.?) I also removed extra '\t's from the test since the first \t is enough for testing whether _expand correctly outputs file types. diff --git a/Test/Y01completion.ztst b/Test/Y01completion.ztst index eff6910c2..ff7a28120 100644 --- a/Test/Y01completion.ztst +++ b/Test/Y01completion.ztst @@ -44,7 +44,7 @@ >line: {: dir1/}{} >line: {: dir2/}{} =20 - comptest $': *\t\t\t\t\t\t\t' + comptest $': *\t' 0:_expand shows file types >line: {: dir1/}{} >DESCRIPTION:{expansions} @@ -56,12 +56,6 @@ >NO:{dir1 dir2 file1 file2} >DESCRIPTION:{original} >NO:{*} ->line: {: dir1/}{} ->line: {: dir2/}{} ->line: {: file1 }{} ->line: {: file2 }{} ->line: {: dir1 dir2 file1 file2 }{} ->line: {: *}{} =20 comptesteval '_users () { compadd user1 user2 }' comptest $': ~\t\t\t\t\t' diff --git a/Test/comptest b/Test/comptest index a36e301e0..8f4081b7d 100644 --- a/Test/comptest +++ b/Test/comptest @@ -48,11 +48,12 @@ zstyle ":completion:*:descriptions" format = "%d " zstyle ":completion:*:options" verbose yes zstyle ":completion:*:values" verbose yes +zstyle ":completion:*" completer _expand _complete setopt noalwayslastprompt listrowsfirst completeinword zmodload zsh/complist expand-or-complete-with-report () { print -lr "" - zle expand-or-complete + zle complete-word print -lr - "$LBUFFER" = "$RBUFFER" zle clear-screen zle -R