|
|
@ -22,6 +22,10 @@ function testGetColorCodeWithNumericalColor() {
|
|
|
|
assertEquals '002' "$(getColorCode '002')"
|
|
|
|
assertEquals '002' "$(getColorCode '002')"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function testGetColorCodeWithNoneColor() {
|
|
|
|
|
|
|
|
assertEquals 'none' "$(getColorCode 'NONE')"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function testIsSameColorComparesAnsiForegroundAndNumericalColorCorrectly() {
|
|
|
|
function testIsSameColorComparesAnsiForegroundAndNumericalColorCorrectly() {
|
|
|
|
assertTrue "isSameColor 'green' '002'"
|
|
|
|
assertTrue "isSameColor 'green' '002'"
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -38,6 +42,18 @@ function testIsSameColorDoesNotYieldNotEqualColorsTruthy() {
|
|
|
|
assertFalse "isSameColor 'green' '003'"
|
|
|
|
assertFalse "isSameColor 'green' '003'"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function testIsSameColorHandlesNoneCorrectly() {
|
|
|
|
|
|
|
|
assertTrue "isSameColor 'none' 'NOnE'"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function testIsSameColorCompareTwoNoneColorsCorrectly() {
|
|
|
|
|
|
|
|
assertTrue "isSameColor 'none' 'none'"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function testIsSameColorComparesColorWithNoneCorrectly() {
|
|
|
|
|
|
|
|
assertFalse "isSameColor 'green' 'none'"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function testBrightColorsWork() {
|
|
|
|
function testBrightColorsWork() {
|
|
|
|
# We had some code in the past that equalized bright colors
|
|
|
|
# We had some code in the past that equalized bright colors
|
|
|
|
# with normal ones. This code is now gone, and this test should
|
|
|
|
# with normal ones. This code is now gone, and this test should
|
|
|
|