From 7fd5ee18bb412e3ee4db694f551a9b9421e18f89 Mon Sep 17 00:00:00 2001 From: Michael Allen Date: Thu, 17 Sep 2015 10:49:37 +0100 Subject: Add prefix and suffix to branch name 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 2a5226a..4283025 100755 --- a/test-format-config.sh +++ b/test-format-config.sh @@ -175,4 +175,24 @@ test_prefix_and_suffix_local() { rm_tmp } +test_prefix_and_suffix_branch() { + prepare_test_repo + + export GIT_RADAR_FORMAT="%{branch}" + prepare_zsh_colors + unset_colours + + prompt="$(render_prompt)" + assertEquals "foo" "$prompt" + + export GIT_RADAR_FORMAT="%{[:branch:]}" + prepare_zsh_colors + unset_colours + + prompt="$(render_prompt)" + assertEquals "[foo]" "$prompt" + + rm_tmp +} + . ./shunit/shunit2 -- cgit v1.2.3