aboutsummaryrefslogtreecommitdiff
path: root/test/segments/node_version.spec
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2018-07-19 23:39:19 +0300
committerDominik Ritter <dritter03@googlemail.com>2018-07-19 23:39:19 +0300
commit16e5e14af747bb310dabd367648b5566cd2edc6b (patch)
tree9593ab0319da9f99bbc5dd29d437b092a806bfb7 /test/segments/node_version.spec
parent4b32b2c0b246e65529e8e055c63be8d58be15f95 (diff)
Fix tests on older ZSH versions
Diffstat (limited to 'test/segments/node_version.spec')
-rwxr-xr-xtest/segments/node_version.spec6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/segments/node_version.spec b/test/segments/node_version.spec
index 2fe3594e..b516e5ff 100755
--- a/test/segments/node_version.spec
+++ b/test/segments/node_version.spec
@@ -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"
}