[Bash-completion-commits] [SCM] bash-completion branch, master, updated. f733e71e1f8d63c072a402346d8162f9c6b63ae2

Freddy Vulto fvulto at gmail.com
Sun Sep 20 12:13:24 UTC 2009


The following commit has been merged in the master branch:
commit fc3f65e6ddf3c3f34a1351c7e7163f183e645116
Author: Freddy Vulto <fvulto at gmail.com>
Date:   Sun Sep 20 12:59:08 2009 +0200

    (testsuite) Supported specifying bash binary
    Using option `--tool_exec' you can now specify which bash binary you
    want to use:
    
        $ ./runUnit --tool_exec /opt/bash-4/bin/bash
        $ ./runCompletion --tool_exec /opt/bash-4/bin/bash
    
    If not specified, current `bash' as found in the tcl path (/bin/bash)
    will be used.

diff --git a/test/lib/completion.exp b/test/lib/completion.exp
index bcb8e76..94fa299 100644
--- a/test/lib/completion.exp
+++ b/test/lib/completion.exp
@@ -8,14 +8,16 @@ proc completion_exit {} {
 
 
 proc completion_start {} {
-    global TESTDIR spawn_id
+    global TESTDIR TOOL_EXECUTABLE spawn_id
     set test "completion_start"
     set TESTDIR [pwd]
 
         # Start bash and load bash-completion
 
-    exp_spawn bash --rcfile config/bashrc
-    assert_bash_exec {} "bash --rcfile config/bashrc"
+    # If `--tool_exec' option not specified, use "bash"
+    if {! [info exists TOOL_EXECUTABLE]} {set TOOL_EXECUTABLE bash}
+    exp_spawn $TOOL_EXECUTABLE --rcfile config/bashrc
+    assert_bash_exec {} "$TOOL_EXECUTABLE --rcfile config/bashrc"
     assert_bash_exec {BASH_COMPLETION_DIR=$(cd ..; pwd)/contrib}
     assert_bash_exec {BASH_COMPLETION=$(cd ..; pwd)/bash_completion}
     assert_bash_exec {source $BASH_COMPLETION}
diff --git a/test/lib/unit.exp b/test/lib/unit.exp
index dd09f67..19612fd 100644
--- a/test/lib/unit.exp
+++ b/test/lib/unit.exp
@@ -8,14 +8,16 @@ proc unit_exit {} {
 
 
 proc unit_start {} {
-    global TESTDIR spawn_id
+    global TESTDIR TOOL_EXECUTABLE spawn_id
     set test "unit_start"
     set TESTDIR [pwd]
 
         # Start bash and load bash-completion
 
-    exp_spawn bash --rcfile config/bashrc
-    assert_bash_exec {} "bash --rcfile config/bashrc"
+    # If `--tool_exec' option not specified, use "bash"
+    if {! [info exists TOOL_EXECUTABLE]} {set TOOL_EXECUTABLE bash}
+    exp_spawn $TOOL_EXECUTABLE --rcfile config/bashrc
+    assert_bash_exec {} "$TOOL_EXECUTABLE --rcfile config/bashrc"
     assert_bash_exec {BASH_COMPLETION_DIR=$(cd ..; pwd)/contrib}
     assert_bash_exec {BASH_COMPLETION=$(cd ..; pwd)/bash_completion}
     # Bash < 3.2.41 has a bug where 'history' disappears from SHELLOPTS

-- 
bash-completion



More information about the Bash-completion-commits mailing list