diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2010-01-24 23:35:32 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2010-01-24 23:35:32 +0200 |
commit | 5c6f45d5bb32b789e7e18f2f45cc7fbe04ab1aba (patch) | |
tree | 5bcea83f03e52accf42dc9732348c670b5e07266 | |
parent | 89e52de0c587b3557fac33b4b0581fd886a51439 (diff) | |
download | bash-completion-5c6f45d5bb32b789e7e18f2f45cc7fbe04ab1aba.tar.gz |
(testsuite) Add cvs roots completion test.
-rw-r--r-- | test/lib/completions/cvs.exp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/lib/completions/cvs.exp b/test/lib/completions/cvs.exp index 2e233c6f..2a26da8e 100644 --- a/test/lib/completions/cvs.exp +++ b/test/lib/completions/cvs.exp @@ -1,10 +1,14 @@ proc setup {} { save_env + assert_bash_exec {OLDHOME=$HOME ; HOME=$TESTDIR/fixtures/cvs} }; # setup() proc teardown {} { - assert_env_unmodified + assert_bash_exec {HOME=$OLDHOME} + assert_env_unmodified { + /OLDHOME=/d + } }; # teardown() @@ -17,4 +21,16 @@ assert_complete_any "cvs " sync_after_int +set test "-d should complete CVS roots" +set cmd "cvs -d " +send "$cmd\t" +expect { + -re "^$cmd\r\n.*:pserver:.*\r\n/@$cmd:pserver:.*$" { pass "$test" } + default { fail "$test" } +}; # expect + + +sync_after_int + + teardown |