mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-18 22:12: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
|
|
@ -12,7 +12,8 @@ function setUp() {
|
|||
}
|
||||
|
||||
function testNodeVersionSegmentPrintsNothingWithoutNode() {
|
||||
local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(node_version custom_world)
|
||||
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(node_version custom_world)
|
||||
local POWERLEVEL9K_CUSTOM_WORLD='echo world'
|
||||
alias node="nonode 2>/dev/null"
|
||||
|
||||
|
|
@ -23,7 +24,8 @@ function testNodeVersionSegmentPrintsNothingWithoutNode() {
|
|||
}
|
||||
|
||||
function testNodeVersionSegmentWorks() {
|
||||
local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(node_version)
|
||||
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(node_version)
|
||||
node() {
|
||||
echo "v1.2.3"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue