Reviewed tests b* & c*

This commit is contained in:
Freddy Vulto 2009-06-14 16:22:25 +02:00
parent 3d723502c9
commit 881bce9618
111 changed files with 758 additions and 997 deletions

View File

@ -1 +0,0 @@
source "lib/completions/bc.exp"

View File

@ -1 +0,0 @@
source "lib/completions/bison.exp"

View File

@ -1 +0,0 @@
source "lib/completions/cancel.exp"

3
test/completion/bc.exp Normal file
View File

@ -0,0 +1,3 @@
if {[assert_bash_type {bc}]} {
source "lib/completions/bc.exp"
}; # if

View File

@ -0,0 +1,3 @@
if {[assert_bash_type {bison}]} {
source "lib/completions/bison.exp"
}; # if

View File

@ -0,0 +1,3 @@
if {[assert_bash_type {cancel}]} {
source "lib/completions/cancel.exp"
}; # if

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "bash --"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "bc --"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "bison --"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "bk "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "btdownloadcurses.py "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "btdownloadgui.py "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "btdownloadheadless.py "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "bzip2 "
sync_after_int
teardown

View File

@ -0,0 +1,21 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
set test "Tab should complete"
assert_complete_any "c++ "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "cancel "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "cardctl "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "cat "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "cc "
sync_after_int
teardown

View File

@ -12,13 +12,7 @@ setup
set test "Tab should complete"
# Try completion
set cmd "cd fixture1/"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
}; # expect
assert_complete {"bar bar.d/" foo.d/} "cd fixture1/" $test
sync_after_int
@ -43,27 +37,11 @@ sync_after_int
set test "Tab should complete CDPATH"
# Set CDPATH
set cmd "CDPATH=\$PWD"
send "$cmd\r"
expect -ex "$cmd\r\n"
expect -ex "/@"
# Try completion
set cmd "cd fixture1/fo"
send "$cmd\t"
expect {
-re "cd fixture1/foo.d/$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
default { unresolved "$test" }
}; # expect
assert_bash_exec "CDPATH=\$PWD";
assert_complete "fixture1/foo.d/" "cd fixture1/fo" $test
sync_after_int
# Reset CDPATH
set cmd "unset CDPATH"
send "$cmd\r"
expect -ex "$cmd\r\n"
expect -ex "/@"
assert_bash_exec "unset CDPATH"
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "cdrecord -d"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "change_pw -"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "check_db -"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "check_perms -"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "chkconfig "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "ci "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "civclient -"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "civserver -"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "cksfv -"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "cleanarch -"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "clisp "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "clone_member -"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "co "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "composite "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "config_list -"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "configure "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "convert "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "cp "
sync_after_int
teardown

View File

@ -0,0 +1,26 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "cpio --"
sync_after_int
assert_complete_any "cpio -R "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "createdb "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "csplit "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "cut "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "cvs "
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "bash --"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,30 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "bc --"
send "$cmd\t"
# NOTE: Wait in case `bc' isn't installed, so that "^$cdm$" doesn't match
# before comp_install has finished
sleep .5
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re "^$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,27 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "bison --"
send "$cmd\t"
expect {
-re "^$cmd.*$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sleep .5
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "bk "
send "$cmd\t"
expect {
-re "^${cmd}(bash: bk: command not found|)\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "btdownloadcurses.py "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "btdownloadgui.py "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "btdownloadheadless.py "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "bzip2 "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "c++ "
send "$cmd\t"
expect {
-re "^c\\+\\+ \r\n.*c\\+\\+ $" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,27 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "cancel "
send "$cmd\t"
expect {
-re "^${cmd}(bash: lpstat: command not found\r\n)*$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sleep .4
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "cardctl "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "cat "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "cc "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "cdrecord -d"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "change_pw -"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "check_db -"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "check_perms -"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should show completions"
# Try completion
set cmd "chkconfig "
send "$cmd\t"
expect {
-re "$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "ci "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "civclient -"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "civserver -"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "cksfv -"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "cleanarch -"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "clisp "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "clone_member -"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "co "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

Some files were not shown because too many files have changed in this diff Show More