mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-18 22:12:32 +01:00
Fix tests
This commit is contained in:
parent
19235b2359
commit
e970a021c8
9 changed files with 83 additions and 83 deletions
|
|
@ -22,7 +22,7 @@ function testStatusPrintsNothingIfReturnCodeIsZeroAndVerboseIsUnset() {
|
|||
local POWERLEVEL9K_STATUS_VERBOSE=false
|
||||
local POWERLEVEL9K_STATUS_SHOW_PIPESTATUS=false
|
||||
|
||||
assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)"
|
||||
assertEquals "%K{015} %F{000}world %k%F{015}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
function testStatusWorksAsExpectedIfReturnCodeIsZeroAndVerboseIsSet() {
|
||||
|
|
@ -31,7 +31,7 @@ function testStatusWorksAsExpectedIfReturnCodeIsZeroAndVerboseIsSet() {
|
|||
local POWERLEVEL9K_STATUS_HIDE_SIGNAME=true
|
||||
local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(status)
|
||||
|
||||
assertEquals "%K{black} %F{green%}✔%f %k%F{black}%f " "$(build_left_prompt)"
|
||||
assertEquals "%K{000} %F{002%}✔%f %k%F{000}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
function testStatusInGeneralErrorCase() {
|
||||
|
|
@ -40,7 +40,7 @@ function testStatusInGeneralErrorCase() {
|
|||
local POWERLEVEL9K_STATUS_VERBOSE=true
|
||||
local POWERLEVEL9K_STATUS_SHOW_PIPESTATUS=false
|
||||
|
||||
assertEquals "%K{red} %F{yellow1%}↵ %f%F{yellow1}1 %k%F{red}%f " "$(build_left_prompt)"
|
||||
assertEquals "%K{009} %F{226%}↵ %f%F{226}1 %k%F{009}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
function testPipestatusInErrorCase() {
|
||||
|
|
@ -50,7 +50,7 @@ function testPipestatusInErrorCase() {
|
|||
local POWERLEVEL9K_STATUS_VERBOSE=true
|
||||
local POWERLEVEL9K_STATUS_SHOW_PIPESTATUS=true
|
||||
|
||||
assertEquals "%K{red} %F{yellow1%}↵ %f%F{yellow1}0|0|1|0 %k%F{red}%f " "$(build_left_prompt)"
|
||||
assertEquals "%K{009} %F{226%}↵ %f%F{226}0|0|1|0 %k%F{009}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
function testStatusCrossWinsOverVerbose() {
|
||||
|
|
@ -60,7 +60,7 @@ function testStatusCrossWinsOverVerbose() {
|
|||
local POWERLEVEL9K_STATUS_VERBOSE=true
|
||||
local POWERLEVEL9K_STATUS_CROSS=true
|
||||
|
||||
assertEquals "%K{black} %F{red%}✘%f %k%F{black}%f " "$(build_left_prompt)"
|
||||
assertEquals "%K{000} %F{009%}✘%f %k%F{000}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
function testStatusShowsSignalNameInErrorCase() {
|
||||
|
|
@ -70,7 +70,7 @@ function testStatusShowsSignalNameInErrorCase() {
|
|||
local POWERLEVEL9K_STATUS_VERBOSE=true
|
||||
local POWERLEVEL9K_STATUS_HIDE_SIGNAME=false
|
||||
|
||||
assertEquals "%K{red} %F{yellow1%}↵ %f%F{yellow1}SIGILL(4) %k%F{red}%f " "$(build_left_prompt)"
|
||||
assertEquals "%K{009} %F{226%}↵ %f%F{226}SIGILL(4) %k%F{009}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
function testStatusSegmentIntegrated() {
|
||||
|
|
@ -79,7 +79,7 @@ function testStatusSegmentIntegrated() {
|
|||
|
||||
false; powerlevel9k_prepare_prompts
|
||||
|
||||
assertEquals "%f%b%k%K{black} %F{red%}✘%f %k%F{black}%f " "${(e)PROMPT}"
|
||||
assertEquals "%f%b%k%K{000} %F{009%}✘%f %k%F{000}%f " "${(e)PROMPT}"
|
||||
}
|
||||
|
||||
source shunit2/source/2.1/src/shunit2
|
||||
Loading…
Add table
Add a link
Reference in a new issue