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

Freddy Vulto fvulto at gmail.com
Sat Oct 31 07:35:46 UTC 2009


The following commit has been merged in the master branch:
commit a55d311ae23d9b16ebd8070d86f2816e29536736
Author: Freddy Vulto <fvulto at gmail.com>
Date:   Sat Oct 31 08:32:58 2009 +0100

    (testsuite) Moved unsetting COMPREPLY

diff --git a/test/lib/library.sh b/test/lib/library.sh
index b4285f1..41ebc8e 100644
--- a/test/lib/library.sh
+++ b/test/lib/library.sh
@@ -18,11 +18,9 @@ diff_env() {
 # Output array elements, sorted and separated by newline
 # Unset variable after outputting.
 # @param $1  Name of array variable to process
-# @param $2  -u (optional) Unset variable after echo
 echo_array() {
 	local IFS=$'\n'
 	eval printf "%s" \"\${$1[*]}\" | sort
-    unset -v $1
 }
 
 
diff --git a/test/unit/_known_hosts_real.exp b/test/unit/_known_hosts_real.exp
index a3669ee..dbf15e6 100644
--- a/test/unit/_known_hosts_real.exp
+++ b/test/unit/_known_hosts_real.exp
@@ -16,7 +16,7 @@ set hosts [get_hosts]
     # Hosts `gee', `hus' and `jar' are defined in ./fixtures/_known_hosts_real/config
     # doo, ike, jub, 10.0.0.1, kyl and 100.0.0.2 in ./fixtures/_known_hosts_real/known_hosts
 lappend hosts doo gee hus ike jar jub kyl 10.0.0.1 100.0.0.2
-set cmd {_known_hosts_real -aF fixtures/_known_hosts_real/config ''; echo_array COMPREPLY}
+set cmd {unset COMPREPLY; _known_hosts_real -aF fixtures/_known_hosts_real/config ''; echo_array COMPREPLY}
 assert_bash_list $hosts $cmd $test
 
 
@@ -34,7 +34,7 @@ foreach host $hosts {
     lappend expected "user@$host:"
 }; # foreach
     # Call _known_hosts
-set cmd {_known_hosts_real -acF fixtures/_known_hosts_real/config 'user@'; echo_array COMPREPLY}
+set cmd {unset COMPREPLY; _known_hosts_real -acF fixtures/_known_hosts_real/config 'user@'; echo_array COMPREPLY}
 assert_bash_list $expected $cmd $test
 
 
@@ -49,7 +49,7 @@ lappend hosts gee hus doo ike two
 set hosts [lsort -ascii $hosts]
 set hosts [join $hosts "\\s+"]
     # Call _known_hosts
-set cmd {_known_hosts_real -aF 'fixtures/_known_hosts_real/spaced  conf' ''; echo_array COMPREPLY}
+set cmd {unset COMPREPLY; _known_hosts_real -aF 'fixtures/_known_hosts_real/spaced  conf' ''; echo_array COMPREPLY}
 send "$cmd\r"
 expect -ex "$cmd\r\n"
 expect {
@@ -69,7 +69,7 @@ set hosts [get_hosts_avahi]
     # doo, ike, jub, 10.0.0.1, kyl and 100.0.0.2 in ./fixtures/_known_hosts_real/known_hosts
 lappend hosts doo gee hus ike jar jub kyl 10.0.0.1 100.0.0.2
     # Call _known_hosts
-set cmd {_known_hosts_real -aF fixtures/_known_hosts_real/config ''; echo_array COMPREPLY}
+set cmd {unset COMPREPLY; _known_hosts_real -aF fixtures/_known_hosts_real/config ''; echo_array COMPREPLY}
 assert_bash_list $hosts $cmd $test
 sync_after_int
 assert_bash_exec "unset -v COMP_KNOWN_HOSTS_WITH_HOSTFILE"

-- 
bash-completion



More information about the Bash-completion-commits mailing list