bash-completion/test/lib/completion.exp
Freddy Vulto e847d57e50 Improved test suite from bash-completion-lib
Run the tests with:
$ cd test
$ ./runCompletionUnit
$ ./runCompletionCompletion

The last test of unit/_known_hosts gives UNRESOLVED and needs fixing.
2009-06-09 22:49:53 +02:00

28 lines
638 B
Plaintext

source lib/library.exp
proc completion_exit {} {
# Exit bash
send "\rexit\r"
}; # completion_exit()
proc completion_start {} {
global TESTDIR spawn_id
set test "completion_start"
set TESTDIR [pwd]
# Start bash and load bash-completion
exp_spawn bash --rcfile config/bashrc
assert_bash_exec {} "bash --rcfile config/bashrc"
assert_bash_exec {BASH_COMPLETION_DIR=$(cd ..; pwd)/contrib}
assert_bash_exec {BASH_COMPLETION=$(cd ..; pwd)/bash_completion}
assert_bash_exec {source $BASH_COMPLETION}
}; # completion_start()
proc completion_version {} {
puts "bash-completion-git"
}