Merge branch 'master' into staging_065
Conflicts were: - README.md: Two commits targeted the brightness table. #781 from 14. April 2018 on master and #684 from 05. December 2017 on next. - powerlevel9k.zsh-theme: Two commits targeted the rbenv segment. Both achieve the same thing: To show the Ruby version number always. #795 on next from 14. April 2018 and #610 on master from 28. September 2017. I went with #795 here as this - although being newer - is the one on master, and that should be more stable.
This commit is contained in:
commit
55473c450a
3 changed files with 54 additions and 16 deletions
|
@ -46,6 +46,27 @@ function testTruncateFoldersWorks() {
|
|||
unset POWERLEVEL9K_SHORTEN_STRATEGY
|
||||
}
|
||||
|
||||
function testTruncateFolderWithHomeDirWorks() {
|
||||
POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
|
||||
CURRENT_DIR=$(pwd)
|
||||
|
||||
cd ~
|
||||
FOLDER="powerlevel9k-test-${RANDOM}"
|
||||
mkdir -p $FOLDER
|
||||
cd $FOLDER
|
||||
# Switch back to home folder as this causes the problem.
|
||||
cd ..
|
||||
|
||||
assertEquals "%K{blue} %F{black}~ %k%F{blue}%f " "$(build_left_prompt)"
|
||||
|
||||
rmdir $FOLDER
|
||||
cd ${CURRENT_DIR}
|
||||
|
||||
unset CURRENT_DIR
|
||||
unset FOLDER
|
||||
unset POWERLEVEL9K_SHORTEN_DIR_LENGTH
|
||||
}
|
||||
|
||||
function testTruncateMiddleWorks() {
|
||||
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
|
||||
POWERLEVEL9K_SHORTEN_STRATEGY='truncate_middle'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue