From 5d2bded520a2649a3cc19b6c767fa23d9b00555e Mon Sep 17 00:00:00 2001 From: Michael Allen Date: Thu, 17 Sep 2015 09:45:57 +0100 Subject: Make providing a prefix and suffix to changes possible --- 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 e595703..ce4645e 100755 --- a/test-format-config.sh +++ b/test-format-config.sh @@ -135,4 +135,24 @@ test_reorder_parts() { rm_tmp } +test_prefix_and_suffix() { + prepare_test_repo + + export GIT_RADAR_FORMAT="%{changes}" + prepare_zsh_colors + unset_colours + + prompt="$(render_prompt)" + assertEquals " 1A" "$prompt" + + export GIT_RADAR_FORMAT="%{[:changes:]}" + prepare_zsh_colors + unset_colours + + prompt="$(render_prompt)" + assertEquals "[ 1A]" "$prompt" + + rm_tmp +} + . ./shunit/shunit2 -- cgit v1.2.3