summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2018-08-09 09:11:19 +0300
committerDominik Ritter <dritter03@googlemail.com>2018-08-09 09:11:19 +0300
commita0d57bc455e654ba688d108219bd254863bca438 (patch)
tree47aada401a4283ef8d775bfdf18678df4cab4902
parente0630d75736aa274f09545f9849c035c0c6cab9b (diff)
Add test for bright colors
-rwxr-xr-xtest/functions/colors.spec9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functions/colors.spec b/test/functions/colors.spec
index d61923f5..e9ae9803 100755
--- a/test/functions/colors.spec
+++ b/test/functions/colors.spec
@@ -38,5 +38,14 @@ function testIsSameColorDoesNotYieldNotEqualColorsTruthy() {
assertFalse "isSameColor 'green' '003'"
}
+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
+ # ensure that all input channels for bright colors are handled
+ # correctly.
+ assertTrue "isSameColor 'cyan' '014'"
+ assertEquals '014' "$(getColorCode 'cyan')"
+ assertEquals '014' "$(getColor 'cyan')"
+}
source shunit2/shunit2