zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: Test failures
Date: Wed, 3 May 2000 10:34:03 +0200 (MET DST)	[thread overview]
Message-ID: <200005030834.KAA22713@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Felix Rosencrantz's message of Tue, 2 May 2000 22:33:31 -0700 (PDT)


Felix Rosencrantz wrote:

> I'm seeing a couple test failures.
> 
> This is new and might be related to 11058:
> *** /tmp/zsh.ztst.out.9344      Tue May  2 10:13:26 2000
> --- /tmp/zsh.ztst.tout.9344     Tue May  2 10:13:27 2000
> ***************
> *** 1,2 ****
>   line: {tst a }{}
> - MESSAGE:{no more arguments}
> --- 1 ----
> Test ./53completion.ztst failed: output differs from expected as shown above
> for:
>  comptest -c "$code" $'tst a \t'
> Was testing: _arguments
> ./53completion.ztst: test failed.

Ouch. Of ourse we have to ensure that messages are displayed even if
there are no matches.

> The following failure has been around since the test was added April 19th.
> 
> *** /tmp/zsh.ztst.out.8907      Tue May  2 10:13:07 2000
> --- /tmp/zsh.ztst.tout.8907     Tue May  2 10:13:07 2000
> ***************
> *** 1,4 ****
>   be could I I programme recorded that watching
> ! be could I I programme recorded that watching
> ! watching that recorded programme I I could be
>   watching that recorded programme I I could be
> --- 1,4 ----
> + I I be could programme recorded that watching
>   be could I I programme recorded that watching
> ! watching that recorded programme could be I I
>   watching that recorded programme I I could be

Oh, look, the strings in the test are sorted with a locale that makes
the order AaBbCc and so on. Either we should make the tests respect
the locale setting or enforce the normal ordering (and change the
strings above).

No patch for this... who added that test?

Bye
 Sven

Index: Completion/Base/_arguments
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/_arguments,v
retrieving revision 1.8
diff -u -r1.8 _arguments
--- Completion/Base/_arguments	2000/05/02 08:23:31	1.8
+++ Completion/Base/_arguments	2000/05/03 08:33:20
@@ -363,7 +363,7 @@
 
   [[ -n "$mesg" ]] && _message "$mesg"
   if [[ -n "$noargs" ]]; then
-    [[ -z "$ismulti" ]] && _message "$noargs"
+    [[ -z "$ismulti" && nm -eq "$compstate[nmatches]" ]] && _message "$noargs"
   else
     has_args=yes
   fi
Index: Src/Zle/compcore.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compcore.c,v
retrieving revision 1.13
diff -u -r1.13 compcore.c
--- Src/Zle/compcore.c	2000/05/02 10:31:11	1.13
+++ Src/Zle/compcore.c	2000/05/03 08:33:22
@@ -152,6 +152,11 @@
 /**/
 mod_export int smatches;
 
+/* The number of messages. */
+
+/**/
+mod_export int nmessages;
+
 /* != 0 if only explanation strings should be printed */
 
 /**/
@@ -312,6 +317,7 @@
     minmlen = 1000000;
     maxmlen = -1;
     compignored = 0;
+    nmessages = 0;
 
     /* Make sure we have the completion list and compctl. */
     if (makecomplist(s, incmd, lst)) {
@@ -401,6 +407,11 @@
 		    clearlist = 1;
 	    } else
 		invalidatelist();
+	} else if (nmessages && forcelist) {
+	    if (uselist)
+		showinglist = -2;
+	    else
+		clearlist = 1;
 	}
     } else {
 	invalidatelist();
@@ -921,7 +932,7 @@
 	hasperm = 0;
 	hasoldlist = 1;
 
-	if (nmatches && !errflag) {
+	if ((nmatches || nmessages) && !errflag) {
 	    validlist = 1;
 
 	    redup(osi, 0);
@@ -2390,6 +2401,7 @@
     addlinknode(expls, e);
     newmatches = 1;
     mgroup->new = 1;
+    nmessages++;
 }
 
 /* The comparison function for matches (used for sorting). */

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~2000-05-03  8:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-03  8:34 Sven Wischnowsky [this message]
2000-05-03  8:39 ` Andrej Borsenkow
2000-05-03  9:13 ` Peter Stephenson

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=200005030834.KAA22713@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).