aboutsummaryrefslogtreecommitdiff
path: root/test/segments/swap.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/swap.spec
parent4b32b2c0b246e65529e8e055c63be8d58be15f95 (diff)
Fix tests on older ZSH versions
Diffstat (limited to 'test/segments/swap.spec')
-rwxr-xr-xtest/segments/swap.spec6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/segments/swap.spec b/test/segments/swap.spec
index 52719395..58f35c0a 100755
--- a/test/segments/swap.spec
+++ b/test/segments/swap.spec
@@ -28,7 +28,8 @@ function tearDown() {
}
function testSwapSegmentWorksOnOsx() {
- local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(swap)
+ local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
+ POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(swap)
local OS="OSX" # Fake OSX
sysctl() {
echo "vm.swapusage: total = 3072,00M used = 1620,50M free = 1451,50M (encrypted)"
@@ -40,7 +41,8 @@ function testSwapSegmentWorksOnOsx() {
}
function testSwapSegmentWorksOnLinux() {
- local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(swap)
+ local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
+ POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(swap)
local OS="Linux" # Fake Linux
mkdir proc
echo "SwapTotal: 1000000" > proc/meminfo