[Bash-completion-devel] Weird compopt.exp unit test problem

Ville Skyttä ville.skytta at iki.fi
Wed Feb 10 16:16:55 UTC 2010


On Tuesday 09 February 2010, Crestez Dan Leonard wrote:
> On Sun, 2010-02-07 at 21:24 +0200, Ville Skyttä wrote:
> > Huh, why does it end up invoking "d $TESTDIR" instead of "cd $TESTDIR",
> > and I suppose the first char of the "{ set; ... " command got lost too? 
> > I tried bisecting but didn't find any particular commit that causes this
> > so I suppose it's something related to my environment.  Other unit and
> > completion tests appear to work fine.  Ideas?
> 
> I can reproduce it on Ubuntu Karmic; with the following package
> versions:
> 
> $ dpkg-query -W expect tcllib tcl bash dejagnu
> bash	4.0-5ubuntu2
> dejagnu	1.4.4.git20080407-1
> expect	5.43.0-17
> tcl	8.4.16-2
> tcllib	1.11.1-dfsg-2
> 
> It seems that this is really a failure in test code. The expect call in
> test/unit/compgen.exp doesn't swallow the prompt, then sync_after_int
> swallows then earlier prompt and so on. Perhaps this problem is only
> revealed by certain versions of expect? I didn't take a very close look.

I tried downgrading dejagnu, expect, tcl, and tcllib to the versions IIRC I 
did not have this problem with, but it persists even with them :(, and besides 
the "new" versions are pretty much plain rebuilds of the earlier ones, except 
tcl which went from 8.5.6 to 8.5.7.  bash version doesn't seem to matter 
either.

Maybe this is what you meant above put in other words, but removing the "-re 
{a\\\'b/c} {" block from compgen.exp or hacking the regexp so that it does not 
match makes the problem go away for me.  I don't think that's the correct fix 
at all, but my tcl/expect-fu is not good enough so it'd make sense for me to 
try to dig deeper.



More information about the Bash-completion-devel mailing list