summaryrefslogtreecommitdiff
path: root/test/lib/completions/cd.exp
diff options
context:
space:
mode:
authorFreddy Vulto <fvulto@gmail.com>2009-06-14 16:22:25 +0200
committerFreddy Vulto <fvulto@gmail.com>2009-06-14 16:22:25 +0200
commit881bce9618e0189b5ab34b8de3eb2c8dd67d1381 (patch)
tree873fee0382c5afe68dd869fc7fcca50882b37285 /test/lib/completions/cd.exp
parent3d723502c9527d85668d8a4ab6b5525f062811ae (diff)
downloadbash-completion-881bce9618e0189b5ab34b8de3eb2c8dd67d1381.tar.gz
Reviewed tests b* & c*
Diffstat (limited to 'test/lib/completions/cd.exp')
-rw-r--r--test/lib/completions/cd.exp30
1 files changed, 4 insertions, 26 deletions
diff --git a/test/lib/completions/cd.exp b/test/lib/completions/cd.exp
index 25d02f05..d4c06d9d 100644
--- a/test/lib/completions/cd.exp
+++ b/test/lib/completions/cd.exp
@@ -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