mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-11 22:02:32 +01:00
Fix tests on older ZSH versions
This commit is contained in:
parent
4b32b2c0b2
commit
16e5e14af7
23 changed files with 227 additions and 132 deletions
|
|
@ -32,14 +32,16 @@ function tearDown() {
|
|||
}
|
||||
|
||||
function testNvmSegmentPrintsNothingIfNvmIsNotAvailable() {
|
||||
local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(nvm custom_world)
|
||||
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(nvm custom_world)
|
||||
local POWERLEVEL9K_CUSTOM_WORLD='echo world'
|
||||
|
||||
assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
function testNvmSegmentWorksWithoutHavingADefaultAlias() {
|
||||
local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(nvm)
|
||||
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(nvm)
|
||||
|
||||
function nvm_version() {
|
||||
[[ ${1} == 'current' ]] && echo 'v4.6.0' || echo 'v1.4.0'
|
||||
|
|
@ -49,7 +51,8 @@ function testNvmSegmentWorksWithoutHavingADefaultAlias() {
|
|||
}
|
||||
|
||||
function testNvmSegmentPrintsNothingWhenOnDefaultVersion() {
|
||||
local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(nvm custom_world)
|
||||
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(nvm custom_world)
|
||||
local POWERLEVEL9K_CUSTOM_WORLD='echo world'
|
||||
|
||||
function nvm_version() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue