Test displaying only stash count (#9573)

This commit is contained in:
Sam Bull 2023-02-15 18:32:50 +00:00 committed by GitHub
parent 5aaa1e69bc
commit ef3516ecdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,6 +146,32 @@ fish_git_prompt
echo
#CHECK: (newbranch +)
set -e __fish_git_prompt_showdirtystate
# Test displaying only stash count
set -g __fish_git_prompt_show_informative_status 1
set -g __fish_git_prompt_showstashstate 1
set -g __fish_git_prompt_status_order stashstate
set -g ___fish_git_prompt_char_stashstate ''
set -g ___fish_git_prompt_char_cleanstate ''
git commit -m 'Init' >/dev/null 2>&1
echo 'changed' > foo
git stash >/dev/null 2>&1
fish_git_prompt
echo
#CHECK: (newbranch|1)
git stash pop >/dev/null 2>&1
fish_git_prompt
echo
#CHECK: (newbranch)
set -e __fish_git_prompt_show_informative_status
set -e __fish_git_prompt_showstashstate
set -e __fish_git_prompt_status_order
set -e ___fish_git_prompt_char_stashstate
set -e ___fish_git_prompt_char_cleanstate
# Turn on everything and verify we correctly ignore sus config files.