zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Re: Test failures
@ 2000-05-03  8:34 Sven Wischnowsky
  2000-05-03  8:39 ` Andrej Borsenkow
  2000-05-03  9:13 ` Peter Stephenson
  0 siblings, 2 replies; 3+ messages in thread
From: Sven Wischnowsky @ 2000-05-03  8:34 UTC (permalink / raw)
  To: zsh-workers


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: PATCH: Re: Test failures
  2000-05-03  8:34 PATCH: Re: Test failures Sven Wischnowsky
@ 2000-05-03  8:39 ` Andrej Borsenkow
  2000-05-03  9:13 ` Peter Stephenson
  1 sibling, 0 replies; 3+ messages in thread
From: Andrej Borsenkow @ 2000-05-03  8:39 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-workers

>
> 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).
>


It is always good idea to export LC_ALL=C LANG=C to avoid side effects.
Unless there are special tests for non-ASCII locale.

-andrej


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: Re: Test failures
  2000-05-03  8:34 PATCH: Re: Test failures Sven Wischnowsky
  2000-05-03  8:39 ` Andrej Borsenkow
@ 2000-05-03  9:13 ` Peter Stephenson
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2000-05-03  9:13 UTC (permalink / raw)
  To: Zsh hackers list

> Felix Rosencrantz wrote:
> > I'm seeing a couple test failures.
> > *** /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).

This restores the C order and sanitises the locale.

Index: Test/13parameter.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/13parameter.ztst,v
retrieving revision 1.1
diff -u -r1.1 13parameter.ztst
--- Test/13parameter.ztst	2000/04/19 19:03:09	1.1
+++ Test/13parameter.ztst	2000/05/03 09:10:50
@@ -229,9 +229,9 @@
   print ${(O)foo}
   print ${(Oi)foo}
 0:${(o)...}, ${(O)...}
+>I I be could programme recorded that watching
 >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 could be I I
 >watching that recorded programme I I could be
 
   foo=(yOU KNOW, THE ONE WITH wILLIAM dALRYMPLE)
Index: Test/ztst.zsh
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/ztst.zsh,v
retrieving revision 1.3
diff -u -r1.3 ztst.zsh
--- Test/ztst.zsh	2000/04/19 19:03:09	1.3
+++ Test/ztst.zsh	2000/05/03 09:10:50
@@ -22,6 +22,11 @@
 # still not be good enough.  Maybe we should trick it somehow.
 emulate -R zsh
 
+# Ensure the locale does not screw up sorting.  Don't supply a locale
+# unless there's one set, to minimise problems.
+[[ -n $LC_ALL ]] && LC_ALL=C
+[[ -n $LANG ]] && LANG=C
+
 # Set the module load path to correspond to this build of zsh.
 # This Modules directory should have been created by "make check".
 [[ -d Modules/zsh ]] && module_path=( $PWD/Modules )

-- 
Peter Stephenson <pws@cambridgesiliconradio.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-05-03  9:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-03  8:34 PATCH: Re: Test failures Sven Wischnowsky
2000-05-03  8:39 ` Andrej Borsenkow
2000-05-03  9:13 ` Peter Stephenson

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).