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 <redacted>
---
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