diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/cvs/.cvspass | 2 | ||||
-rw-r--r-- | test/lib/completions/cvsps.exp | 20 |
2 files changed, 20 insertions, 2 deletions
diff --git a/test/fixtures/cvs/.cvspass b/test/fixtures/cvs/.cvspass new file mode 100644 index 00000000..e7e0dce7 --- /dev/null +++ b/test/fixtures/cvs/.cvspass @@ -0,0 +1,2 @@ +/1 :pserver:anonymous@cvs.savannah.nongnu.org:2401/sources/cvs A +/1 :pserver:anonymous@cvs.fedoraproject.org:2401/cvs/pkgs A diff --git a/test/lib/completions/cvsps.exp b/test/lib/completions/cvsps.exp index add74c0b..1fd4a0a9 100644 --- a/test/lib/completions/cvsps.exp +++ b/test/lib/completions/cvsps.exp @@ -1,17 +1,33 @@ 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() setup -assert_complete_any "cvsps " +assert_complete_any "cvsps -" + + +sync_after_int + + +set test "No arguments should complete CVS roots" +set cmd "cvsps " +send "$cmd\t" +expect { + -re "^$cmd\r\n.*:pserver:.*\r\n/@$cmd:pserver:.*$" { pass "$test" } + default { fail "$test" } +}; # expect sync_after_int |