From ba353caa989463204ad18498da854a9702112e70 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Sun, 5 Aug 2018 22:40:39 +0200 Subject: [PATCH] Fix tests for context segment --- test/segments/context.spec | 5 +++++ 1 file changed, 5 insertions(+) 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?