[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 0fe71268180e093ffccc3ec785a57730092b2274

Ville Skyttä ville.skytta at iki.fi
Sun Sep 19 16:13:55 UTC 2010


The following commit has been merged in the master branch:
commit 0fe71268180e093ffccc3ec785a57730092b2274
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sun Sep 19 19:12:51 2010 +0300

    (testsuite) Fix cd test when CDPATH is set.

diff --git a/test/lib/completions/cd.exp b/test/lib/completions/cd.exp
index 2101f03..6616cd8 100644
--- a/test/lib/completions/cd.exp
+++ b/test/lib/completions/cd.exp
@@ -37,11 +37,12 @@ sync_after_int
 
 set test "Tab should complete CDPATH"
     # Set CDPATH
+assert_bash_exec "declare -p CDPATH &>/dev/null && OLDCDPATH=\$CDPATH || :"
 assert_bash_exec "CDPATH=\$PWD";
 assert_complete "fixtures/shared/default/foo.d/" "cd fixtures/shared/default/fo" $test
 sync_after_int
     # Reset CDPATH
-assert_bash_exec "unset CDPATH"
+assert_bash_exec "declare -p OLDCDPATH &>/dev/null && CDPATH=\$OLDCDPATH || unset CDPATH && unset OLDCDPATH"
 
 
 teardown

-- 
bash-completion



More information about the Bash-completion-commits mailing list