From d2c7ed085ff711a9f34fc1b0f521bcde253f19c5 Mon Sep 17 00:00:00 2001 From: Michael Allen Date: Thu, 17 Sep 2015 10:55:09 +0100 Subject: Add prefix and suffixing to remote diff render --- test-format-config.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test-format-config.sh') 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 -- cgit v1.2.3