Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: Test failures
- X-seq: zsh-workers 11092
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: Re: Test failures
- Date: Wed, 3 May 2000 10:34:03 +0200 (MET DST)
- In-reply-to: Felix Rosencrantz's message of Tue, 2 May 2000 22:33:31 -0700 (PDT)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author