diff options
Diffstat (limited to 'test/segments/custom.spec')
-rwxr-xr-x | test/segments/custom.spec | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/test/segments/custom.spec b/test/segments/custom.spec index 261e2508..b7719d1c 100755 --- a/test/segments/custom.spec +++ b/test/segments/custom.spec @@ -7,8 +7,6 @@ SHUNIT_PARENT=$0 function setUp() { export TERM="xterm-256color" - # Load Powerlevel9k - source powerlevel9k.zsh-theme } function testCustomDirectOutputSegment() { @@ -16,6 +14,9 @@ function testCustomDirectOutputSegment() { POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_world) local POWERLEVEL9K_CUSTOM_WORLD="echo world" + # Load Powerlevel9k + source powerlevel9k.zsh-theme + assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)" } @@ -26,6 +27,9 @@ function testCustomClosureSegment() { echo "world" } local POWERLEVEL9K_CUSTOM_WORLD='p9k_hello_world' + + # Load Powerlevel9k + source powerlevel9k.zsh-theme assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)" } @@ -36,6 +40,9 @@ function testSettingBackgroundForCustomSegment() { local POWERLEVEL9K_CUSTOM_WORLD="echo world" local POWERLEVEL9K_CUSTOM_WORLD_BACKGROUND="yellow" + # Load Powerlevel9k + source powerlevel9k.zsh-theme + assertEquals "%K{yellow} %F{black}world %k%F{yellow}%f " "$(build_left_prompt)" } @@ -45,6 +52,9 @@ function testSettingForegroundForCustomSegment() { local POWERLEVEL9K_CUSTOM_WORLD="echo world" local POWERLEVEL9K_CUSTOM_WORLD_FOREGROUND="red" + # Load Powerlevel9k + source powerlevel9k.zsh-theme + assertEquals "%K{white} %F{red}world %k%F{white}%f " "$(build_left_prompt)" } @@ -54,6 +64,9 @@ function testSettingVisualIdentifierForCustomSegment() { local POWERLEVEL9K_CUSTOM_WORLD="echo world" local POWERLEVEL9K_CUSTOM_WORLD_ICON="hw" + # Load Powerlevel9k + source powerlevel9k.zsh-theme + assertEquals "%K{white} %F{black%}hw %f%F{black}world %k%F{white}%f " "$(build_left_prompt)" } @@ -64,6 +77,9 @@ function testSettingVisualIdentifierForegroundColorForCustomSegment() { local POWERLEVEL9K_CUSTOM_WORLD_ICON="hw" local POWERLEVEL9K_CUSTOM_WORLD_VISUAL_IDENTIFIER_COLOR="red" + # Load Powerlevel9k + source powerlevel9k.zsh-theme + assertEquals "%K{white} %F{red%}hw %f%F{black}world %k%F{white}%f " "$(build_left_prompt)" } |