mirror of
https://github.com/romkatv/powerlevel10k
synced 2025-02-10 07:28:01 +00:00
Fix tests for dir segment on OSX
This commit is contained in:
parent
cf353f5660
commit
7bfa471e41
@ -22,7 +22,15 @@ function testDirPathAbsoluteWorks() {
|
|||||||
POWERLEVEL9K_DIR_PATH_ABSOLUTE=true
|
POWERLEVEL9K_DIR_PATH_ABSOLUTE=true
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
assertEquals "%K{blue} %F{black}/home/travis %k%F{blue}%f " "$(build_left_prompt)"
|
|
||||||
|
# Unfortunately, we cannot fake Linux or OSX here, because
|
||||||
|
# of /home or /Users path.. That is why we change the test
|
||||||
|
# according to the OS of the host.
|
||||||
|
if [[ "${OS}" == 'Linux' ]]; then
|
||||||
|
assertEquals "%K{blue} %F{black}/home/${USER} %k%F{blue}%f " "$(build_left_prompt)"
|
||||||
|
elif [[ "${OS}" == 'OSX' ]]; then
|
||||||
|
assertEquals "%K{blue} %F{black}/Users/${USER} %k%F{blue}%f " "$(build_left_prompt)"
|
||||||
|
fi
|
||||||
|
|
||||||
cd -
|
cd -
|
||||||
unset POWERLEVEL9K_DIR_PATH_ABSOLUTE
|
unset POWERLEVEL9K_DIR_PATH_ABSOLUTE
|
||||||
|
Loading…
Reference in New Issue
Block a user