[Bash-completion-devel] [bash-completion-Bugs][312746] _tilde.exp unit test failure with bash 3.2

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Mon Apr 25 10:39:16 UTC 2011


Bugs item #312746, was changed at 2010-10-10 11:51 by Ville Skyttä 
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312746&group_id=100114

>Status: Closed
Priority: 3
Submitted By: Ville Skyttä  (scop-guest)
Assigned to: Nobody (None)
Summary: _tilde.exp unit test failure with bash 3.2 
Distribution: None
Originally reported in: None
Milestone: None
>Status: Won't Fix
Original bug number: 


Initial Comment:
I'm getting this failure when running the _tilde.exp unit test with bash 3.2.25 or 3.2.39; with 4.1.7 it passes fine.

$ ./runUnit --tool_exec ~/bin/bash-3.2.39 _tilde.exp
[...]
Running ./unit/_tilde.exp ...
ERROR executing bash command "compgen -u"ERROR: tcl error sourcing ./unit/_tilde.exp.
ERROR: can't read "full": no such variable
    while executing
"format {_tilde "~%s"; printf "%%s" "${COMPREPLY[@]}"} $full"
    invoked from within
"set cmd [format {_tilde "~%s"; printf "%%s" "${COMPREPLY[@]}"} $full]"
    (file "./unit/_tilde.exp" line 39)
    invoked from within
"source ./unit/_tilde.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source ./unit/_tilde.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name""


----------------------------------------------------------------------

>Comment By: Ville Skyttä  (scop-guest)
Date: 2011-04-25 13:39

Message:
bash < 4.1 is no longer supported.

----------------------------------------------------------------------

Comment By: Ville Skyttä  (scop-guest)
Date: 2010-10-11 00:56

Message:
Hm, for some reason both my bash 3.2's return nothing from "compgen -u", I suppose that's why things break.

----------------------------------------------------------------------

Comment By: Ville Skyttä  (scop-guest)
Date: 2010-10-11 00:46

Message:
It does with bash 4.1.7 (part: avahi-, full: avahi-autoipd just like in your bash 3.2.48 output), but with bash 3.2.x with those lines added it blows up at 'send_user "part: $part"':

ERROR executing bash command "compgen -u"ERROR: tcl error sourcing ./unit/_tilde.exp.
ERROR: can't read "part": no such variable
    while executing
"send_user "part: $part\n""
    (file "./unit/_tilde.exp" line 22)

----------------------------------------------------------------------

Comment By: Freddy Vulto (fvu-guest)
Date: 2010-10-10 22:54

Message:
I cannot reproduce the problem on bash-3.2.0, bash-3.2.39 or bash-3.2.48.
I put a debug message in:

    --- a/test/unit/_tilde.exp
    +++ b/test/unit/_tilde.exp
    @@ -19,6 +19,8 @@ proc teardown {} {
     
     setup part full
     
    +send_user "part: $part\n"
    +send_user "full: $full\n"
     
     set test "function should run without errors"
     assert_bash_exec {_tilde > /dev/null} $test

And this is the output:

    $ ./run unit/_tilde.exp 
    ...
    part: avahi-
    full: avahi-autoipd

            === unit Summary ===

    # of expected passes		3
    /mnt/proj/bashCompletion/bash-completion.git/test, bash-3.2.48(1)-release

    ---8<---------------------------------------------------------------

    $ ./runUnit --tool_exec /opt/bash-3.2.0/bin/bash _tilde.exp
    ...
    Running ./unit/_tilde.exp ...
    part: Debia
    full: Debian-exim

            === unit Summary ===

    # of expected passes		3
    /home/freddy/proj/bashCompletion/bash-completion.git/test, bash-3.2.0(1)-release

    ---8<---------------------------------------------------------------

    $ ./runUnit _tilde.expTest Run By freddy on Sun Oct 10 21:47:15 2010
    ...
    Running ./unit/_tilde.exp ...
    part: Debia
    full: Debian-exim

            === unit Summary ===

    # of expected passes		3
    /home/freddy/proj/bashCompletion/bash-completion.git/test, bash-3.2.39(1)-release

Strange that `full' variable isn't available in your error, because it seems
available on my tests.  Does the debug message output `part' and `full'
successfully on your machine?

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312746&group_id=100114



More information about the Bash-completion-devel mailing list