summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-09-17 14:16:58 +0100
committerMichael Allen <michael@michaelallen.io>2015-09-17 14:16:58 +0100
commiteabe1d7e855817714a9e06b59ff468951413f6c6 (patch)
treee0cb0d4c2b38ea72726dbaaadfb05a440e734047
parent1537438e5798502cad17ba10cf19016e400f7c42 (diff)
downloadgit-sonar-eabe1d7e855817714a9e06b59ff468951413f6c6.tar.gz
git-sonar-eabe1d7e855817714a9e06b59ff468951413f6c6.zip
Further testing when not in a repo
-rwxr-xr-xtest-format-config.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/test-format-config.sh b/test-format-config.sh
index ea76405..5504ebc 100755
--- a/test-format-config.sh
+++ b/test-format-config.sh
@@ -68,6 +68,22 @@ prepare_test_repo() {
}
test_all_options_set_config() {
+ cd_to_tmp "empty"
+ export GIT_RADAR_FORMAT="%{branch}%{local}%{changes}"
+ # Don't test remote as in no repo you will get upstream error message
+ prepare_zsh_colors
+ unset_colours
+
+ prompt="$(render_prompt)"
+ assertEquals "$prompt" ""
+
+ export GIT_RADAR_FORMAT="%{remote}"
+ # Don't test remote as in no repo you will get upstream error message
+ prepare_zsh_colors
+ unset_colours
+
+ prompt="$(render_prompt)"
+ assertEquals "$prompt" "upstream ⚡"
prepare_test_repo
export GIT_RADAR_FORMAT="%{remote}%{branch}%{local}%{changes}"