mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-04 21:56:46 +01:00
Prepare tests for performance optimizations
This commit is contained in:
parent
99f0eddd62
commit
06de83cc0f
31 changed files with 645 additions and 117 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue