1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-17 21:30:07 +00:00

Fix tests for context segment

This commit is contained in:
Dominik Ritter 2018-08-05 22:40:39 +02:00
parent 3c991f902c
commit ba353caa98

View file

@ -49,6 +49,9 @@ function testContextSegmentDoesGetRenderedWhenSshConnectionIsOpen() {
}
function testContextSegmentWithForeignUser() {
function sudo() {
return 0
}
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context)
@ -56,6 +59,8 @@ function testContextSegmentWithForeignUser() {
source powerlevel9k.zsh-theme
assertEquals "%K{black} %F{yellow}%n@%m %k%F{black}%f " "$(build_left_prompt)"
unfunction sudo
}
# TODO: How to test root?