1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-22 15:21:56 +00:00

Fix tests

It seems like Travis changed their infrastructure. We
need to unset SSH_TTY and SSH_CLIENT to get the tests
working again.
This commit is contained in:
Dominik Ritter 2018-10-07 00:01:45 +02:00
parent b16c0d51d6
commit d1cd83bf0b

View file

@ -21,6 +21,11 @@ function tearDown() {
}
function testContextSegmentDoesNotGetRenderedWithDefaultUser() {
# Fix leaked state for travis
unset POWERLEVEL9K_CONTEXT_ALWAYS_SHOW
unset SSH_CLIENT
unset SSH_TTY
local DEFAULT_USER=$(whoami)
local POWERLEVEL9K_CUSTOM_WORLD='echo world'
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
@ -99,6 +104,11 @@ function testContextSegmentIsShownIfDefaultUserIsSetWhenForced() {
}
function testContextSegmentIsShownIfForced() {
# Fix leaked state for travis
unset POWERLEVEL9K_CONTEXT_ALWAYS_SHOW
unset SSH_CLIENT
unset SSH_TTY
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context)
local POWERLEVEL9K_ALWAYS_SHOW_USER=true