mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-11 22:02:32 +01:00
Merge branch 'fix_colors' into prepare_066
This commit is contained in:
commit
e0630d7573
30 changed files with 107 additions and 97 deletions
|
|
@ -18,7 +18,7 @@ function testOverwritingIconsWork() {
|
|||
local POWERLEVEL9K_CUSTOM_WORLD1='echo world1'
|
||||
local POWERLEVEL9K_CUSTOM_WORLD1_ICON='icon-here'
|
||||
|
||||
assertEquals "%K{015} %F{000%}icon-here %f%F{000}world1 %k%F{015}%f " "$(build_left_prompt)"
|
||||
assertEquals "%K{015} %F{000}icon-here %f%F{000}world1 %k%F{015}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
function testVisualIdentifierAppearsBeforeSegmentContentOnLeftSegments() {
|
||||
|
|
@ -27,7 +27,7 @@ function testVisualIdentifierAppearsBeforeSegmentContentOnLeftSegments() {
|
|||
local POWERLEVEL9K_CUSTOM_WORLD1='echo world1'
|
||||
local POWERLEVEL9K_CUSTOM_WORLD1_ICON='icon-here'
|
||||
|
||||
assertEquals "%K{015} %F{000%}icon-here %f%F{000}world1 %k%F{015}%f " "$(build_left_prompt)"
|
||||
assertEquals "%K{015} %F{000}icon-here %f%F{000}world1 %k%F{015}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
function testVisualIdentifierAppearsAfterSegmentContentOnRightSegments() {
|
||||
|
|
@ -36,7 +36,7 @@ function testVisualIdentifierAppearsAfterSegmentContentOnRightSegments() {
|
|||
local POWERLEVEL9K_CUSTOM_WORLD1='echo world1'
|
||||
local POWERLEVEL9K_CUSTOM_WORLD1_ICON='icon-here'
|
||||
|
||||
assertEquals "%F{015}%f%K{015}%F{000} world1%F{000%} icon-here%f%E" "$(build_right_prompt)"
|
||||
assertEquals "%F{015}%f%K{015}%F{000} world1%F{000} icon-here%f%E" "$(build_right_prompt)"
|
||||
}
|
||||
|
||||
function testVisualIdentifierPrintsNothingIfNotAvailable() {
|
||||
|
|
@ -47,4 +47,14 @@ function testVisualIdentifierPrintsNothingIfNotAvailable() {
|
|||
assertEquals "%K{015} %F{000}world1 %k%F{015}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
function testVisualIdentifierIsPrintedInNumericalColorCode() {
|
||||
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_world1)
|
||||
local POWERLEVEL9K_CUSTOM_WORLD1='echo world1'
|
||||
local POWERLEVEL9K_CUSTOM_WORLD1_ICON="xxx"
|
||||
local POWERLEVEL9K_CUSTOM_WORLD1_VISUAL_IDENTIFIER_COLOR="purple3"
|
||||
|
||||
assertEquals "%K{015} %F{056}xxx %f%F{000}world1 %k%F{015}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
source shunit2/shunit2
|
||||
Loading…
Add table
Add a link
Reference in a new issue