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

Ville Skyttä ville.skytta at iki.fi
Fri Feb 5 20:21:09 UTC 2010


The following commit has been merged in the master branch:
commit 35ebc8aec8af49a6e4eb9a3b3ab0845c3d5a0da5
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri Feb 5 22:19:34 2010 +0200

    (testsuite) Add lftp hostname completion testing fixture.

diff --git a/test/fixtures/lftp/.lftp/bookmarks b/test/fixtures/lftp/.lftp/bookmarks
new file mode 100644
index 0000000..31ec930
--- /dev/null
+++ b/test/fixtures/lftp/.lftp/bookmarks
@@ -0,0 +1 @@
+lftptest	ftp://ftp.funet.fi/
diff --git a/test/lib/completions/lftp.exp b/test/lib/completions/lftp.exp
index 4bdde37..a49a193 100644
--- a/test/lib/completions/lftp.exp
+++ b/test/lib/completions/lftp.exp
@@ -1,4 +1,5 @@
 proc setup {} {
+    assert_bash_exec {HOME=$TESTDIR/fixtures/lftp}
     save_env
 }; # setup()
 
@@ -11,7 +12,10 @@ proc teardown {} {
 setup
 
 
-assert_complete_any "lftp "
+set expected [get_hosts]
+# `lftptest' is defined in ./fixtures/lftp/.lftp/bookmarks
+lappend expected lftptest
+assert_complete $expected "lftp "
 
 
 sync_after_int

-- 
bash-completion



More information about the Bash-completion-commits mailing list