summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2018-06-07 02:29:04 +0300
committerDominik Ritter <dritter03@googlemail.com>2018-06-07 02:29:04 +0300
commit40219759bb4deaee31023e2ab01e0804f34bf00a (patch)
treec80ed4b7f387ba27f6a2531953a8482f0622b630 /test
parent47e2aed4b2d19775b6f495dc6695d1b876aef083 (diff)
parent37cbc9a02d16b1d152dcc2c6af51214d316639d3 (diff)
Merge branch 'fix_rprompt_newline' into staging_065
Diffstat (limited to 'test')
-rwxr-xr-xtest/powerlevel9k.spec19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/powerlevel9k.spec b/test/powerlevel9k.spec
index 5f6b6f27..4178a4f6 100755
--- a/test/powerlevel9k.spec
+++ b/test/powerlevel9k.spec
@@ -114,4 +114,23 @@ function testOverwritingIconsWork() {
# rm -fr ~/$testFolder
}
+function testNewlineOnRpromptCanBeDisabled() {
+ POWERLEVEL9K_PROMPT_ON_NEWLINE=true
+ POWERLEVEL9K_RPROMPT_ON_NEWLINE=false
+ POWERLEVEL9K_CUSTOM_WORLD='echo world'
+ POWERLEVEL9K_CUSTOM_RWORLD='echo rworld'
+ POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_world)
+ POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(custom_rworld)
+
+ powerlevel9k_prepare_prompts
+ assertEquals '$(print_icon MULTILINE_FIRST_PROMPT_PREFIX) world  $(print_icon MULTILINE_LAST_PROMPT_PREFIX) rworld ' "$(print -P ${PROMPT}${RPROMPT})"
+
+ unset POWERLEVEL9K_PROMPT_ON_NEWLINE
+ unset POWERLEVEL9K_RPROMPT_ON_NEWLINE
+ unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
+ unset POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS
+ unset POWERLEVEL9K_CUSTOM_WORLD
+ unset POWERLEVEL9K_CUSTOM_RWORLD
+}
+
source shunit2/source/2.1/src/shunit2