mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 08:00:06 +00:00
Added test for Home folder highlighting
This commit is contained in:
parent
b6f20d1032
commit
1e54872873
1 changed files with 12 additions and 0 deletions
|
@ -429,9 +429,11 @@ function testTruncateToUniqueWorks() {
|
||||||
|
|
||||||
function testBoldHomeDirectoryWorks() {
|
function testBoldHomeDirectoryWorks() {
|
||||||
POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD=true
|
POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD=true
|
||||||
|
cd ~
|
||||||
|
|
||||||
assertEquals "%K{blue} %F{black}%B~%b %k%F{blue}%f " "$(build_left_prompt)"
|
assertEquals "%K{blue} %F{black}%B~%b %k%F{blue}%f " "$(build_left_prompt)"
|
||||||
|
|
||||||
|
cd -
|
||||||
unset POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD
|
unset POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,4 +447,14 @@ function testBoldOtherDirectoryWorks() {
|
||||||
unset POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD
|
unset POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testDirHighlightHomeWorks() {
|
||||||
|
POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND='red'
|
||||||
|
cd ~
|
||||||
|
|
||||||
|
assertEquals "%K{blue} %F{black}%F{red}~%b %k%F{blue}%f " "$(build_left_prompt)"
|
||||||
|
|
||||||
|
cd -
|
||||||
|
unset POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND
|
||||||
|
}
|
||||||
|
|
||||||
source shunit2/source/2.1/src/shunit2
|
source shunit2/source/2.1/src/shunit2
|
||||||
|
|
Loading…
Reference in a new issue