[PATCH 2/2] t9903: add test case for bash.showUntrackedFiles
- From
Martin Erik Werner <martinerikwerner@gmail.com>
- Date
- Feb 12, 2013, 20:12 UTC
- Message-ID
- <1360699936-28688-3-git-send-email-martinerikwerner@gmail.com>
- In-Reply-To
- <1360699936-28688-1-git-send-email-martinerikwerner@gmail.com>
Add a test case for the bash.showUntrackedFiles config option, which checks that the config option can disable the global effect of the GIT_PS1_SHOWUNTRACKEDFILES environmant variable.
Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com> --- t/t9903-bash-prompt.sh | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh index f17c1f8..c9417b9 100755 --- a/t/t9903-bash-prompt.sh +++ b/t/t9903-bash-prompt.sh @@ -447,6 +447,17 @@ test_expect_success 'prompt - untracked files status indicator - not shown insid test_cmp expected "$actual" ' +test_expect_success 'prompt - untracked files status indicator - disabled by config' ' + printf " (master)" > expected && + echo "untracked" > file_untracked && + test_config bash.showUntrackedFiles false && + ( + GIT_PS1_SHOWUNTRACKEDFILES=y && + __git_ps1 > "$actual" + ) && + test_cmp expected "$actual" +' + test_expect_success 'prompt - format string starting with dash' ' printf -- "-master" > expected && __git_ps1 "-%s" > "$actual" &&
-- 1.7.10.4