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

Ville Skyttä ville.skytta at iki.fi
Tue Sep 28 15:00:58 UTC 2010


The following commit has been merged in the master branch:
commit 7f5c64e58014bca82efdb34c0015b091a8c5d84f
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue Sep 28 17:59:31 2010 +0300

    (testsuite) Add some [host]:port cases to known hosts related tests.

diff --git a/test/fixtures/_known_hosts_real/known_hosts b/test/fixtures/_known_hosts_real/known_hosts
index bf39e84..07e20ec 100644
--- a/test/fixtures/_known_hosts_real/known_hosts
+++ b/test/fixtures/_known_hosts_real/known_hosts
@@ -4,3 +4,5 @@ doo
 ike ssh-rsa qwerty1234/Qwerty+1234==
 jub,10.0.0.1
 kyl,100.0.0.2
+[10.10.0.3]:10022
+[blah]:1234
diff --git a/test/fixtures/scp/known_hosts b/test/fixtures/scp/known_hosts
index d54a04d..2dfa4b6 100644
--- a/test/fixtures/scp/known_hosts
+++ b/test/fixtures/scp/known_hosts
@@ -2,3 +2,4 @@
 |1|def
 doo
 ike ssh-rsa qwerty1234/Qwerty+1234==
+[blah]:1234
diff --git a/test/fixtures/sftp/known_hosts b/test/fixtures/sftp/known_hosts
index d54a04d..6538eb4 100644
--- a/test/fixtures/sftp/known_hosts
+++ b/test/fixtures/sftp/known_hosts
@@ -2,3 +2,4 @@
 |1|def
 doo
 ike ssh-rsa qwerty1234/Qwerty+1234==
+[10.10.10.10]:2222
diff --git a/test/lib/completions/scp.exp b/test/lib/completions/scp.exp
index e1f7336..4ab514d 100644
--- a/test/lib/completions/scp.exp
+++ b/test/lib/completions/scp.exp
@@ -52,12 +52,12 @@ set test "Tab should complete known-hosts"
     # Build string list of expected completions
     # Get hostnames and give them a colon (:) suffix
     # Hosts `gee' and `hus' are defined in ./fixtures/scp/config
-    # Hosts `doo' and `ike' are defined in ./fixtures/scp/known_hosts
+    # Hosts `blah', `doo' and `ike' are defined in ./fixtures/scp/known_hosts
 set expected {}
 foreach host [get_hosts] {
     lappend expected "$host:"
 }
-lappend expected doo: gee: hus: ike:
+lappend expected blah: doo: gee: hus: ike:
     # Append local filenames
 lappend expected config known_hosts "spaced\\ \\ conf"
 set dir fixtures/scp
@@ -90,8 +90,8 @@ foreach host [get_hosts] {
     lappend expected "$host:"
 }
     # Hosts `gee', `hus' and `jar' are defined in "./fixtures/scp/spaced  conf"
-    # Hosts `doo' and `ike' are defined in ./fixtures/scp/known_hosts
-lappend expected doo: gee: hus: ike: jar:
+    # Hosts `blah', `doo' and `ike' are defined in ./fixtures/scp/known_hosts
+lappend expected blah: doo: gee: hus: ike: jar:
     # Append local filenames
 lappend expected config known_hosts "spaced\\ \\ conf"
 set dir fixtures/scp
diff --git a/test/lib/completions/sftp.exp b/test/lib/completions/sftp.exp
index 186a055..30837ec 100644
--- a/test/lib/completions/sftp.exp
+++ b/test/lib/completions/sftp.exp
@@ -18,8 +18,8 @@ setup
     # Build string list of expected completions
 set expected [get_hosts]
     # Hosts `gee' and `hus' are defined in ./fixtures/sftp/config
-    # Hosts `doo' and `ike' are defined in ./fixtures/sftp/known_hosts
-lappend expected doo gee hus ike
+    # Hosts `10.10.10.10', `doo' and `ike' are defined in ./fixtures/sftp/known_hosts
+lappend expected 10.10.10.10 doo gee hus ike
 set dir fixtures/sftp
 assert_complete_dir $expected "sftp -F config " $dir
 
@@ -46,8 +46,8 @@ sync_after_int
     # Get hostnames and give them a colon (:) suffix
 set expected [get_hosts]
     # Hosts `gee', `hus' and `jar' are defined in "./fixtures/sftp/spaced  conf"
-    # Hosts `doo' and `ike' are defined in ./fixtures/sftp/known_hosts
-lappend expected doo gee hus ike jar
+    # Hosts `10.10.10.10', `doo' and `ike' are defined in ./fixtures/sftp/known_hosts
+lappend expected 10.10.10.10 doo gee hus ike jar
 set dir fixtures/sftp
 assert_complete_dir $expected "sftp -F spaced\\ \\ conf " $dir
 
diff --git a/test/unit/_known_hosts_real.exp b/test/unit/_known_hosts_real.exp
index 3184279..0b1a82f 100644
--- a/test/unit/_known_hosts_real.exp
+++ b/test/unit/_known_hosts_real.exp
@@ -17,8 +17,8 @@ setup
 set test "Hosts should be put in COMPREPLY"
 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
+    # doo, ike, jub, 10.0.0.1, kyl, 100.0.0.2, 10.10.0.3 and blah in ./fixtures/_known_hosts_real/known_hosts
+lappend hosts blah doo gee hus ike jar jub kyl 10.0.0.1 100.0.0.2 10.10.0.3
 set cmd {unset COMPREPLY; _known_hosts_real -aF fixtures/_known_hosts_real/config ''; echo_array COMPREPLY}
 assert_bash_list $hosts $cmd $test
 
@@ -29,8 +29,8 @@ sync_after_int
 set test "Hosts should have username prefix and colon suffix"
 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
+    # doo, ike, jub, 10.0.0.1, kyl, 100.0.0.2, 10.10.0.3 and blah in ./fixtures/_known_hosts_real/known_hosts
+lappend hosts blah doo gee hus ike jar jub kyl 10.0.0.1 100.0.0.2 10.10.0.3
 set hosts [lsort -ascii $hosts]
 set expected {}
 foreach host $hosts {
@@ -103,8 +103,8 @@ set test "Empty COMP_KNOWN_HOSTS_WITH_HOSTFILE should omit HOSTFILE"
 assert_bash_exec "COMP_KNOWN_HOSTS_WITH_HOSTFILE="
 set hosts [get_hosts_avahi]
     # 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
+    # doo, ike, jub, 10.0.0.1, kyl, 100.0.0.2, 10.10.0.3 and blah in ./fixtures/_known_hosts_real/known_hosts
+lappend hosts blah doo gee hus ike jar jub kyl 10.0.0.1 100.0.0.2 10.10.0.3
     # Call _known_hosts
 set cmd {unset COMPREPLY; _known_hosts_real -aF fixtures/_known_hosts_real/config ''; echo_array COMPREPLY}
 assert_bash_list $hosts $cmd $test

-- 
bash-completion



More information about the Bash-completion-commits mailing list