diff options
author | Michael Allen <michael@michaelallen.io> | 2015-09-17 10:55:09 +0100 |
---|---|---|
committer | Michael Allen <michael@michaelallen.io> | 2015-09-17 10:55:09 +0100 |
commit | d2c7ed085ff711a9f34fc1b0f521bcde253f19c5 (patch) | |
tree | 06f6cba4956a5b1b74d0893b701647562af64ad0 /test-format-config.sh | |
parent | 7fd5ee18bb412e3ee4db694f551a9b9421e18f89 (diff) | |
download | git-sonar-d2c7ed085ff711a9f34fc1b0f521bcde253f19c5.tar.gz git-sonar-d2c7ed085ff711a9f34fc1b0f521bcde253f19c5.zip |
Add prefix and suffixing to remote diff render
Diffstat (limited to 'test-format-config.sh')
-rwxr-xr-x | test-format-config.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test-format-config.sh b/test-format-config.sh index 4283025..8b786c9 100755 --- a/test-format-config.sh +++ b/test-format-config.sh @@ -195,4 +195,24 @@ test_prefix_and_suffix_branch() { rm_tmp } +test_prefix_and_suffix_remote() { + prepare_test_repo + + export GIT_RADAR_FORMAT="%{remote}" + prepare_zsh_colors + unset_colours + + prompt="$(render_prompt)" + assertEquals "m 1 → " "$prompt" + + export GIT_RADAR_FORMAT="%{[:remote:]}" + prepare_zsh_colors + unset_colours + + prompt="$(render_prompt)" + assertEquals "[m 1 → ]" "$prompt" + + rm_tmp +} + . ./shunit/shunit2 |