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

Freddy Vulto fvulto at gmail.com
Fri Jun 19 12:49:10 UTC 2009


The following commit has been merged in the master branch:
commit 49f739a515ba6cac474653d3e91a163d9937f406
Author: Freddy Vulto <fvulto at gmail.com>
Date:   Fri Jun 19 14:47:34 2009 +0200

    Make finger test use new 'assert_complete_partial'

diff --git a/test/lib/completions/finger.exp b/test/lib/completions/finger.exp
index 93ee9ed..935c9b2 100644
--- a/test/lib/completions/finger.exp
+++ b/test/lib/completions/finger.exp
@@ -24,18 +24,7 @@ sync_after_int
 
 
 set test "Tab should complete partial username"
-# Build string list of usernames, starting with the character of the 
-# first username.
-set users {}
-set char ""
-foreach u [exec bash -c "compgen -A user"] {
-    if {$char == ""} {set char [string range $u 0 0]}
-        # Only append username if starting with $char
-    if {[string range $u 0 0] == "$char"} {
-        lappend users $u
-    }; # if
-}; # foreach
-assert_complete $users "finger $char" $test
+assert_complete_partial [exec bash -c "compgen -A user"] "finger"
 
 
 sync_after_int

-- 
bash-completion



More information about the Bash-completion-commits mailing list