aboutsummaryrefslogtreecommitdiff
path: root/test/segments/ssh.spec
diff options
context:
space:
mode:
Diffstat (limited to 'test/segments/ssh.spec')
-rwxr-xr-xtest/segments/ssh.spec18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/segments/ssh.spec b/test/segments/ssh.spec
index a5360072..a6701dcf 100755
--- a/test/segments/ssh.spec
+++ b/test/segments/ssh.spec
@@ -7,12 +7,6 @@ SHUNIT_PARENT=$0
function setUp() {
export TERM="xterm-256color"
- # Load Powerlevel9k
- source powerlevel9k.zsh-theme
-}
-
-function mockRust() {
- echo 'rustc 0.4.1a-alpha'
}
function testSshSegmentPrintsNothingIfNoSshConnection() {
@@ -25,6 +19,9 @@ function testSshSegmentPrintsNothingIfNoSshConnection() {
unset SSH_CLIENT
unset SSH_TTY
+ # Load Powerlevel9k
+ source powerlevel9k.zsh-theme
+
assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)"
}
@@ -37,6 +34,9 @@ function testSshSegmentWorksIfOnlySshClientIsSet() {
SSH_CLIENT='ssh-client'
unset SSH_TTY
+ # Load Powerlevel9k
+ source powerlevel9k.zsh-theme
+
assertEquals "%K{black} %F{yellow%}ssh-icon%f %k%F{black}%f " "$(build_left_prompt)"
unset SSH_CLIENT
@@ -51,6 +51,9 @@ function testSshSegmentWorksIfOnlySshTtyIsSet() {
SSH_TTY='ssh-tty'
unset SSH_CLIENT
+ # Load Powerlevel9k
+ source powerlevel9k.zsh-theme
+
assertEquals "%K{black} %F{yellow%}ssh-icon%f %k%F{black}%f " "$(build_left_prompt)"
unset SSH_TTY
@@ -65,6 +68,9 @@ function testSshSegmentWorksIfAllNecessaryVariablesAreSet() {
SSH_CLIENT='ssh-client'
SSH_TTY='ssh-tty'
+ # Load Powerlevel9k
+ source powerlevel9k.zsh-theme
+
assertEquals "%K{black} %F{yellow%}ssh-icon%f %k%F{black}%f " "$(build_left_prompt)"
unset SSH_TTY