[Bash-completion-commits] [bash-completion] 02/02: (testsuite) Add cd in dir without subdirs or CDPATH test case
Ville Skyttä
scop-guest at moszumanska.debian.org
Sat Nov 1 19:49:41 UTC 2014
This is an automated email from the git hooks/post-receive script.
scop-guest pushed a commit to branch master
in repository bash-completion.
commit 9444a8742e3aa8d1ef8eb35a377a860f9e59fa43
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Nov 1 21:46:50 2014 +0200
(testsuite) Add cd in dir without subdirs or CDPATH test case
---
test/lib/completions/cd.exp | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/test/lib/completions/cd.exp b/test/lib/completions/cd.exp
index 55bae15..6f36c88 100644
--- a/test/lib/completions/cd.exp
+++ b/test/lib/completions/cd.exp
@@ -4,7 +4,7 @@ proc setup {} {
proc teardown {} {
- assert_env_unmodified
+ assert_env_unmodified {/OLDPWD=/d}
}
@@ -42,7 +42,15 @@ assert_bash_exec "CDPATH=\$PWD";
assert_complete "$::srcdir/fixtures/shared/default/foo.d/" \
"cd $::srcdir/fixtures/shared/default/fo" $test -nospace -expect-cmd-minus fo
sync_after_int
- # Reset CDPATH
+
+assert_bash_exec "unset CDPATH"
+# Assuming no subdirs here
+assert_bash_exec "cd $::srcdir/fixtures/shared/default/foo.d"
+assert_no_complete "cd " "cd shouldn't complete when there are no subdirs or CDPATH"
+sync_after_int
+
+ # Reset PWD and CDPATH
+assert_bash_exec "cd \"\$OLDPWD\""
assert_bash_exec "declare -p OLDCDPATH &>/dev/null && CDPATH=\$OLDCDPATH || unset CDPATH && unset OLDCDPATH"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git
More information about the Bash-completion-commits
mailing list