From 7a1319c2d98da16e0b2bd32dd43f9660a74ed8d7 Mon Sep 17 00:00:00 2001
From: Dominik Ritter <dritter03@googlemail.com>
Date: Fri, 10 Aug 2018 00:47:20 +0200
Subject: Add tests for color comparisons with none colors

---
 test/functions/colors.spec | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/test/functions/colors.spec b/test/functions/colors.spec
index e9ae9803..ce777913 100755
--- a/test/functions/colors.spec
+++ b/test/functions/colors.spec
@@ -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
-- 
cgit v1.2.3