mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
Fix tests for context segment
This commit is contained in:
parent
3c991f902c
commit
ba353caa98
1 changed files with 5 additions and 0 deletions
|
@ -49,6 +49,9 @@ function testContextSegmentDoesGetRenderedWhenSshConnectionIsOpen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function testContextSegmentWithForeignUser() {
|
function testContextSegmentWithForeignUser() {
|
||||||
|
function sudo() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context)
|
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context)
|
||||||
|
|
||||||
|
@ -56,6 +59,8 @@ function testContextSegmentWithForeignUser() {
|
||||||
source powerlevel9k.zsh-theme
|
source powerlevel9k.zsh-theme
|
||||||
|
|
||||||
assertEquals "%K{black} %F{yellow}%n@%m %k%F{black}%f " "$(build_left_prompt)"
|
assertEquals "%K{black} %F{yellow}%n@%m %k%F{black}%f " "$(build_left_prompt)"
|
||||||
|
|
||||||
|
unfunction sudo
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: How to test root?
|
# TODO: How to test root?
|
||||||
|
|
Loading…
Reference in a new issue