Merge branch 'fix_colors' into prepare_066

This commit is contained in:
Dominik Ritter 2018-08-08 01:54:55 +02:00
commit c7e543ff23
39 changed files with 589 additions and 601 deletions

View file

@ -21,7 +21,7 @@ function testJoinedSegments() {
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir dir_joined)
cd /tmp
assertEquals "%K{blue} %F{black}/tmp %K{blue}%F{black}%F{black}/tmp %k%F{blue}%f " "$(build_left_prompt)"
assertEquals "%K{012} %F{000}/tmp %K{012}%F{000}%F{000}/tmp %k%F{012}%f " "$(build_left_prompt)"
cd -
}
@ -31,7 +31,7 @@ function testTransitiveJoinedSegments() {
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir root_indicator_joined dir_joined)
cd /tmp
assertEquals "%K{blue} %F{black}/tmp %K{blue}%F{black}%F{black}/tmp %k%F{blue}%f " "$(build_left_prompt)"
assertEquals "%K{012} %F{000}/tmp %K{012}%F{000}%F{000}/tmp %k%F{012}%f " "$(build_left_prompt)"
cd -
}
@ -41,7 +41,7 @@ function testJoiningWithConditionalSegment() {
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir background_jobs dir_joined)
cd /tmp
assertEquals "%K{blue} %F{black}/tmp %K{blue}%F{black} %F{black}/tmp %k%F{blue}%f " "$(build_left_prompt)"
assertEquals "%K{012} %F{000}/tmp %K{012}%F{000} %F{000}/tmp %k%F{012}%f " "$(build_left_prompt)"
cd -
}
@ -52,7 +52,7 @@ function testDynamicColoringOfSegmentsWork() {
local POWERLEVEL9K_DIR_DEFAULT_BACKGROUND='red'
cd /tmp
assertEquals "%K{red} %F{black}/tmp %k%F{red}%f " "$(build_left_prompt)"
assertEquals "%K{009} %F{000}/tmp %k%F{009}%f " "$(build_left_prompt)"
cd -
}
@ -65,7 +65,7 @@ function testDynamicColoringOfVisualIdentifiersWork() {
cd /tmp
assertEquals "%K{blue} %F{green%}icon-here %f%F{black}/tmp %k%F{blue}%f " "$(build_left_prompt)"
assertEquals "%K{012} %F{green%}icon-here %f%F{000}/tmp %k%F{012}%f " "$(build_left_prompt)"
cd -
}
@ -84,7 +84,7 @@ function testColoringOfVisualIdentifiersDoesNotOverwriteColoringOfSegment() {
cd /tmp
assertEquals "%K{yellow} %F{green%}icon-here %f%F{red}/tmp %k%F{yellow}%f " "$(build_left_prompt)"
assertEquals "%K{011} %F{green%}icon-here %f%F{009}/tmp %k%F{011}%f " "$(build_left_prompt)"
cd -
}
@ -100,7 +100,7 @@ function testOverwritingIconsWork() {
#cd ~/$testFolder
cd /tmp
assertEquals "%K{blue} %F{black%}icon-here %f%F{black}/tmp %k%F{blue}%f " "$(build_left_prompt)"
assertEquals "%K{012} %F{000%}icon-here %f%F{000}/tmp %k%F{012}%f " "$(build_left_prompt)"
cd -
# rm -fr ~/$testFolder
@ -117,7 +117,7 @@ function testNewlineOnRpromptCanBeDisabled() {
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(custom_rworld)
powerlevel9k_prepare_prompts
assertEquals '$(print_icon MULTILINE_FIRST_PROMPT_PREFIX) world  $(print_icon MULTILINE_LAST_PROMPT_PREFIX) rworld' "$(print -P ${PROMPT}${RPROMPT})"
assertEquals '$(print_icon MULTILINE_FIRST_PROMPT_PREFIX) world  $(print_icon MULTILINE_LAST_PROMPT_PREFIX) rworld' "$(print -P ${PROMPT}${RPROMPT})"
}
source shunit2/shunit2