aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2018-08-05 23:40:39 +0300
committerDominik Ritter <dritter03@googlemail.com>2018-08-05 23:40:39 +0300
commitba353caa989463204ad18498da854a9702112e70 (patch)
tree0730fef02e7097c727863b06c585b458463faa8d /test
parent3c991f902c967f184e7933183b09b5cb96673bf7 (diff)
Fix tests for context segment
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?