diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2018-07-19 23:39:19 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2018-07-19 23:39:19 +0300 |
commit | 16e5e14af747bb310dabd367648b5566cd2edc6b (patch) | |
tree | 9593ab0319da9f99bbc5dd29d437b092a806bfb7 /test/segments/ssh.spec | |
parent | 4b32b2c0b246e65529e8e055c63be8d58be15f95 (diff) |
Fix tests on older ZSH versions
Diffstat (limited to 'test/segments/ssh.spec')
-rwxr-xr-x | test/segments/ssh.spec | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/segments/ssh.spec b/test/segments/ssh.spec index 2ad4341e..a5360072 100755 --- a/test/segments/ssh.spec +++ b/test/segments/ssh.spec @@ -16,7 +16,8 @@ function mockRust() { } function testSshSegmentPrintsNothingIfNoSshConnection() { - local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh custom_world) + local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS + POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh custom_world) local POWERLEVEL9K_CUSTOM_WORLD='echo "world"' local POWERLEVEL9K_SSH_ICON="ssh-icon" # Weak test: Emulate No SSH connection by unsetting @@ -28,7 +29,8 @@ function testSshSegmentPrintsNothingIfNoSshConnection() { } function testSshSegmentWorksIfOnlySshClientIsSet() { - local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh) + local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS + POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh) local POWERLEVEL9K_SSH_ICON="ssh-icon" # Weak test: Emulate No SSH connection by unsetting # $SSH_CLIENT and $SSH_TTY @@ -41,7 +43,8 @@ function testSshSegmentWorksIfOnlySshClientIsSet() { } function testSshSegmentWorksIfOnlySshTtyIsSet() { - local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh) + local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS + POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh) local POWERLEVEL9K_SSH_ICON="ssh-icon" # Weak test: Emulate No SSH connection by unsetting # $SSH_CLIENT and $SSH_TTY @@ -54,7 +57,8 @@ function testSshSegmentWorksIfOnlySshTtyIsSet() { } function testSshSegmentWorksIfAllNecessaryVariablesAreSet() { - local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh) + local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS + POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh) local POWERLEVEL9K_SSH_ICON="ssh-icon" # Weak test: Emulate No SSH connection by unsetting # $SSH_CLIENT and $SSH_TTY |