aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/segments/context.spec5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/segments/context.spec b/test/segments/context.spec
index 987c3899..49795668 100755
--- a/test/segments/context.spec
+++ b/test/segments/context.spec
@@ -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?