summaryrefslogtreecommitdiffstats
path: root/test-format-config.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-09-17 09:45:57 +0100
committerMichael Allen <michael@michaelallen.io>2015-09-17 09:45:57 +0100
commit5d2bded520a2649a3cc19b6c767fa23d9b00555e (patch)
treef2630d0feaf8d6e5c10f135930910807e02da75f /test-format-config.sh
parent6b6467dd66d7d8bd7b2ac357063876f9bed3a3cb (diff)
downloadgit-sonar-5d2bded520a2649a3cc19b6c767fa23d9b00555e.tar.gz
git-sonar-5d2bded520a2649a3cc19b6c767fa23d9b00555e.zip
Make providing a prefix and suffix to changes possible
Diffstat (limited to 'test-format-config.sh')
-rwxr-xr-xtest-format-config.sh20
1 files changed, 20 insertions, 0 deletions
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