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

Freddy Vulto fvulto at gmail.com
Fri Oct 2 17:44:31 UTC 2009


The following commit has been merged in the master branch:
commit 9eb0ee28519c9f83817af7ab19f6375ae02e1a43
Author: Freddy Vulto <fvulto at gmail.com>
Date:   Fri Oct 2 16:39:11 2009 +0200

    (test suite) Added global var `bash_versinfo_0'
    This variable was introduced by unit/_get_cword.exp but is now upgraded
    to a global var.

diff --git a/test/lib/completion.exp b/test/lib/completion.exp
index 94fa299..299f269 100644
--- a/test/lib/completion.exp
+++ b/test/lib/completion.exp
@@ -8,7 +8,7 @@ proc completion_exit {} {
 
 
 proc completion_start {} {
-    global TESTDIR TOOL_EXECUTABLE spawn_id
+    global bash_versinfo_0 TESTDIR TOOL_EXECUTABLE spawn_id
     set test "completion_start"
     set TESTDIR [pwd]
 
@@ -21,6 +21,8 @@ proc completion_start {} {
     assert_bash_exec {BASH_COMPLETION_DIR=$(cd ..; pwd)/contrib}
     assert_bash_exec {BASH_COMPLETION=$(cd ..; pwd)/bash_completion}
     assert_bash_exec {source $BASH_COMPLETION}
+    # Fill global var `bash_versinfo_0' with bash major version number
+    assert_bash_exec {printf "%s" "${BASH_VERSINFO[0]}"} "" /@ bash_versinfo_0
 }; # completion_start()
 
 
diff --git a/test/lib/unit.exp b/test/lib/unit.exp
index 19612fd..14e64cc 100644
--- a/test/lib/unit.exp
+++ b/test/lib/unit.exp
@@ -8,7 +8,7 @@ proc unit_exit {} {
 
 
 proc unit_start {} {
-    global TESTDIR TOOL_EXECUTABLE spawn_id
+    global bash_versinfo_0 TESTDIR TOOL_EXECUTABLE spawn_id
     set test "unit_start"
     set TESTDIR [pwd]
 
@@ -27,6 +27,8 @@ proc unit_start {} {
     # -- FVu, Tue Sep 15 22:52:00 CEST 2009
     assert_bash_exec {is_bash_version_minimal 3 2 41 || set +o history}
     assert_bash_exec {source $BASH_COMPLETION}
+    # Fill global var `bash_versinfo_0' with bash major version number
+    assert_bash_exec {printf "%s" "${BASH_VERSINFO[0]}"} "" /@ bash_versinfo_0
 }; # unit_start()
 
 
diff --git a/test/unit/_get_cword.exp b/test/unit/_get_cword.exp
index 94b18b5..ec29bf1 100644
--- a/test/unit/_get_cword.exp
+++ b/test/unit/_get_cword.exp
@@ -19,11 +19,6 @@ proc teardown {} {
 setup
 
 
-# Retrieve bash major version number
-set bash_versinfo_0 {}
-assert_bash_exec {printf "%s" "${BASH_VERSINFO[0]}"} "" /@ bash_versinfo_0
-
-
 set test "_get_cword should run without errors"
 assert_bash_exec {_get_cword > /dev/null} $test
 

-- 
bash-completion



More information about the Bash-completion-commits mailing list