[Bash-completion-devel] assert_bash_exec output treatment

Freddy Vulto fvulto at gmail.com
Mon Sep 20 20:55:52 UTC 2010


On 100919 11:30, Ville Skyttä wrote:
> Hello,
> 
> The _filedir.exp unit test currently outputs:
> 
> ERROR Unexpected output from bash command "_filedir should run without 
> errors":
> bash: compopt: not currently executing completion function
> 
> ...but that's just an error message output, it doesn't actually cause a test 
> suite failure.  I wonder if that's on purpose, and what's "multipass_name" in 
> assert_bash_exec?

I used "multipass_name" as a detection mechanism to see if DejaGnu was fully
initialized.  I think I inserted this check after calling `assert_bash_exec' in
an early stage during the initialization of the test suite, where the `fail'
method wasn't yet available causing a DejaGnu unknown method error.  There
might be a better way...

So commented code looks like this:

    // Is DejaGnu fully initialized, i.e. is "fail" method available?
    if {[info exists multipass_name]} {
        fail "ERROR Unexpected output from bash command \"$title\""
    }
    send_user "ERROR Unexpected output from bash command \"$title\":\n$results"

I'll add these comments (commit ba41910).


Greetings,

Freddy Vulto
http://fvue.nl



More information about the Bash-completion-devel mailing list