summaryrefslogtreecommitdiff
path: root/test/segments/symfony_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/symfony_version.spec
parent4b32b2c0b246e65529e8e055c63be8d58be15f95 (diff)
Fix tests on older ZSH versions
Diffstat (limited to 'test/segments/symfony_version.spec')
-rwxr-xr-xtest/segments/symfony_version.spec15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/segments/symfony_version.spec b/test/segments/symfony_version.spec
index ba0bf96a..65d193b0 100755
--- a/test/segments/symfony_version.spec
+++ b/test/segments/symfony_version.spec
@@ -28,7 +28,8 @@ function tearDown() {
}
function testSymfonyVersionSegmentPrintsNothingIfPhpIsNotAvailable() {
- local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(symfony2_version custom_world)
+ local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
+ POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(symfony2_version custom_world)
local POWERLEVEL9K_CUSTOM_WORLD='echo world'
alias php="nophp"
@@ -38,7 +39,8 @@ function testSymfonyVersionSegmentPrintsNothingIfPhpIsNotAvailable() {
}
function testSymfonyVersionSegmentPrintsNothingIfSymfonyIsNotAvailable() {
- local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(symfony2_version custom_world)
+ local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
+ POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(symfony2_version custom_world)
# "Symfony" is not a command, but rather a framework.
# To sucessfully execute this test, we just need to
# navigate into a folder that does not contain symfony.
@@ -48,7 +50,8 @@ function testSymfonyVersionSegmentPrintsNothingIfSymfonyIsNotAvailable() {
}
function testSymfonyVersionPrintsNothingIfPhpThrowsAnError() {
- local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(symfony2_version custom_world)
+ local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
+ POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(symfony2_version custom_world)
local POWERLEVEL9K_CUSTOM_WORLD='echo world'
mkdir app
touch app/AppKernel.php
@@ -65,7 +68,8 @@ function testSymfonyVersionPrintsNothingIfPhpThrowsAnError() {
function testSymfonyVersionSegmentWorks() {
startSkipping # Skip test
- local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(symfony2_version)
+ local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
+ POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(symfony2_version)
mkdir app
touch app/AppKernel.php
@@ -80,7 +84,8 @@ function testSymfonyVersionSegmentWorks() {
function testSymfonyVersionSegmentWorksInNestedFolder() {
startSkipping # Skip test
- local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(symfony2_version)
+ local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
+ POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(symfony2_version)
mkdir app
touch app/AppKernel.php