Merge pull request #1148 from dritter/remove_nodeenv_disable_prompt

Remove checking for NODEENV_DISABLE_PROMPT
This commit is contained in:
Dominik Ritter 2019-02-01 17:06:10 +01:00 committed by GitHub
commit 5c7d1009de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 24 deletions

View file

@ -44,26 +44,6 @@ function testNodeenvSegmentPrintsNothingIfNodeVirtualEnvIsNotSet() {
unfunction node
}
function testNodeenvSegmentPrintsNothingIfNodeVirtualEnvDisablePromptIsSet() {
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(nodeenv custom_world)
local POWERLEVEL9K_CUSTOM_WORLD='echo world'
node() {
echo "v1.2.3"
}
NODE_VIRTUAL_ENV="node-env"
NODE_VIRTUAL_ENV_DISABLE_PROMPT=true
# Load Powerlevel9k
source powerlevel9k.zsh-theme
assertEquals "%K{007} %F{000}world %k%F{007}%f " "$(build_left_prompt)"
unset NODE_VIRTUAL_ENV_DISABLE_PROMPT
unset NODE_VIRTUAL_ENV
unfunction node
}
function testNodeenvSegmentPrintsAtLeastNodeEnvWithoutNode() {
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(nodeenv)