zsh-workers
 help / color / mirror / code / Atom feed
From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: Y01 Test Failure on Arch
Date: Thu, 1 Apr 2021 13:05:10 +0900	[thread overview]
Message-ID: <A36DEE01-E038-4F5C-91E6-1B2972E3487F@kba.biglobe.ne.jp> (raw)
In-Reply-To: <CACeGjnW0YAGgU7MwHA-qXcb1QcnvrYrks0zh0+pdhVwMgmyxNg@mail.gmail.com>


> 2021/03/31 22:40, Vin Shelton <acs@alumni.princeton.edu> wrote:
> 
> 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/}{}
 
-  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: {: *}{}
 
   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 "<DESCRIPTION>%d</DESCRIPTION>
 "
 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 "<WIDGET><expand-or-complete>"
-  zle expand-or-complete
+  zle complete-word
   print -lr - "<LBUFFER>$LBUFFER</LBUFFER>" "<RBUFFER>$RBUFFER</RBUFFER>"
   zle clear-screen
   zle -R








  reply	other threads:[~2021-04-01  4:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 13:40 Vin Shelton
2021-04-01  4:05 ` Jun T [this message]
2021-04-03 11:32   ` Vin Shelton
2021-04-04  4:05     ` Jun. T
2021-04-04 14:00       ` Vin Shelton
2021-04-04 17:02         ` Daniel Shahaf
2021-04-05 14:58           ` Marlon Richert
2021-04-06  4:23             ` Jun T
2021-04-06 11:38               ` Marlon
2021-04-06  9:53             ` Oliver Kiddle
2021-04-04 18:27         ` Bart Schaefer
2021-04-05  0:39           ` Vin Shelton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A36DEE01-E038-4F5C-91E6-1B2972E3487F@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).