mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
Add tests for color comparisons with none colors
This commit is contained in:
parent
6daef84c60
commit
7a1319c2d9
1 changed files with 16 additions and 0 deletions
|
@ -22,6 +22,10 @@ function testGetColorCodeWithNumericalColor() {
|
|||
assertEquals '002' "$(getColorCode '002')"
|
||||
}
|
||||
|
||||
function testGetColorCodeWithNoneColor() {
|
||||
assertEquals 'none' "$(getColorCode 'NONE')"
|
||||
}
|
||||
|
||||
function testIsSameColorComparesAnsiForegroundAndNumericalColorCorrectly() {
|
||||
assertTrue "isSameColor 'green' '002'"
|
||||
}
|
||||
|
@ -38,6 +42,18 @@ function testIsSameColorDoesNotYieldNotEqualColorsTruthy() {
|
|||
assertFalse "isSameColor 'green' '003'"
|
||||
}
|
||||
|
||||
function testIsSameColorHandlesNoneCorrectly() {
|
||||
assertTrue "isSameColor 'none' 'NOnE'"
|
||||
}
|
||||
|
||||
function testIsSameColorCompareTwoNoneColorsCorrectly() {
|
||||
assertTrue "isSameColor 'none' 'none'"
|
||||
}
|
||||
|
||||
function testIsSameColorComparesColorWithNoneCorrectly() {
|
||||
assertFalse "isSameColor 'green' 'none'"
|
||||
}
|
||||
|
||||
function testBrightColorsWork() {
|
||||
# We had some code in the past that equalized bright colors
|
||||
# with normal ones. This code is now gone, and this test should
|
||||
|
|
Loading…
Reference in a new issue