summaryrefslogtreecommitdiffstats
path: root/test-format-config.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-09-17 10:40:06 +0100
committerMichael Allen <michael@michaelallen.io>2015-09-17 10:40:06 +0100
commit3e809c83741cc6466090169404dd0aa2672d29ac (patch)
tree15cb08b3dfeb50085b38f069d1718a4e4b6478af /test-format-config.sh
parent5d2bded520a2649a3cc19b6c767fa23d9b00555e (diff)
downloadgit-sonar-3e809c83741cc6466090169404dd0aa2672d29ac.tar.gz
git-sonar-3e809c83741cc6466090169404dd0aa2672d29ac.zip
Add prefix/suffixing to local diff
Diffstat (limited to '')
-rwxr-xr-xtest-format-config.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/test-format-config.sh b/test-format-config.sh
index ce4645e..2a5226a 100755
--- a/test-format-config.sh
+++ b/test-format-config.sh
@@ -135,7 +135,7 @@ test_reorder_parts() {
rm_tmp
}
-test_prefix_and_suffix() {
+test_prefix_and_suffix_changes() {
prepare_test_repo
export GIT_RADAR_FORMAT="%{changes}"
@@ -155,4 +155,24 @@ test_prefix_and_suffix() {
rm_tmp
}
+test_prefix_and_suffix_local() {
+ prepare_test_repo
+
+ export GIT_RADAR_FORMAT="%{local}"
+ prepare_zsh_colors
+ unset_colours
+
+ prompt="$(render_prompt)"
+ assertEquals " 1↑" "$prompt"
+
+ export GIT_RADAR_FORMAT="%{[:local:]}"
+ prepare_zsh_colors
+ unset_colours
+
+ prompt="$(render_prompt)"
+ assertEquals "[ 1↑]" "$prompt"
+
+ rm_tmp
+}
+
. ./shunit/shunit2