diff options
Diffstat (limited to 'test/lib/completions/xhost.exp')
-rw-r--r-- | test/lib/completions/xhost.exp | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/test/lib/completions/xhost.exp b/test/lib/completions/xhost.exp deleted file mode 100644 index 02aa4cb2..00000000 --- a/test/lib/completions/xhost.exp +++ /dev/null @@ -1,95 +0,0 @@ -proc setup {} { - assert_bash_exec {HOME=$TESTDIR} - save_env -} - - -proc teardown {} { - assert_env_unmodified -} - - -setup - - -set test "Tab should complete hostnames" -assert_complete [get_hosts] "xhost " $test - - -sync_after_int - - -set test "Tab should complete partial hostname" -# Build string list of hostnames, starting with the character of the first hostname -set hosts {} -set char "" -foreach h [get_hosts] { - if {$char == ""} {set char [string range $h 0 0]} - # Only append hostname if starting with $char - if {[string range $h 0 0] == "$char"} { - lappend hosts $h - } -} -assert_complete $hosts "xhost $char" $test -expect-cmd-minus "$char" - - -sync_after_int - - -set test "Tab should complete hostnames prefixed with +" -# Build string list of hostnames, prefixed with plus (+) -set hosts {} -foreach h [get_hosts] { - lappend hosts "+$h" -} -assert_complete $hosts "xhost \+" $test - - -sync_after_int - - -set test "Tab should complete partial hostname prefixed with +" - # Build string list of hostnames, starting with character of first host. -set hosts {} -foreach h [get_hosts] { - if {$char == ""} {set char [string range $h 0 0]} - # Only append hostname if starting with $char - if {[string range $h 0 0] == "$char"} { - lappend hosts "+$h" - } -} -assert_complete $hosts "xhost +$char" $test -expect-cmd-minus "\+$char" - - -sync_after_int - - -set test "Tab should complete hostnames prefixed with -" - # Build string list of hostnames, prefix with minus (-) -set hosts {} -foreach h [get_hosts] { - lappend hosts "-$h" -} -assert_complete $hosts "xhost -" $test - - -sync_after_int - - -set test "Tab should complete partial hostname prefixed with -" - # Build list of hostnames, starting with character of first host -set hosts {} -foreach h [get_hosts] { - if {$char == ""} {set char [string range $h 0 0]} - # Only append hostname if starting with $char - if {[string range $h 0 0] == "$char"} { - lappend hosts "-$h" - } -} -assert_complete $hosts "xhost -$char" $test -expect-cmd-minus "-$char" - - -sync_after_int - - -teardown |