diff options
Diffstat (limited to 'test/segments/anaconda.spec')
-rwxr-xr-x | test/segments/anaconda.spec | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/segments/anaconda.spec b/test/segments/anaconda.spec index 11add849..da87c096 100755 --- a/test/segments/anaconda.spec +++ b/test/segments/anaconda.spec @@ -13,7 +13,8 @@ function setUp() { function testAnacondaSegmentPrintsNothingIfNoAnacondaPathIsSet() { local POWERLEVEL9K_CUSTOM_WORLD='echo world' - local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(anaconda custom_world) + local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS + POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(anaconda custom_world) # Unset anacona variables unset CONDA_ENV_PATH unset CONDA_PREFIX @@ -24,7 +25,8 @@ function testAnacondaSegmentPrintsNothingIfNoAnacondaPathIsSet() { function testAnacondaSegmentWorksIfOnlyAnacondaPathIsSet() { CONDA_ENV_PATH=/tmp unset CONDA_PREFIX - local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(anaconda) + local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS + POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(anaconda) local POWERLEVEL9K_PYTHON_ICON="icon-here" assertEquals "%K{blue} %F{black%}icon-here %f%F{black}(tmp) %k%F{blue}%f " "$(build_left_prompt)" @@ -33,7 +35,8 @@ function testAnacondaSegmentWorksIfOnlyAnacondaPathIsSet() { function testAnacondaSegmentWorksIfOnlyAnacondaPrefixIsSet() { unset CONDA_ENV_PATH local CONDA_PREFIX="test" - local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(anaconda) + local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS + POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(anaconda) local POWERLEVEL9K_PYTHON_ICON="icon-here" assertEquals "%K{blue} %F{black%}icon-here %f%F{black}(test) %k%F{blue}%f " "$(build_left_prompt)" @@ -42,7 +45,8 @@ function testAnacondaSegmentWorksIfOnlyAnacondaPrefixIsSet() { function testAnacondaSegmentWorks() { local CONDA_ENV_PATH=/tmp local CONDA_PREFIX="test" - local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(anaconda) + local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS + POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(anaconda) local POWERLEVEL9K_PYTHON_ICON="icon-here" assertEquals "%K{blue} %F{black%}icon-here %f%F{black}(tmptest) %k%F{blue}%f " "$(build_left_prompt)" |