diff options
Diffstat (limited to 'tests/unit/gui/test-gui-color.cpp')
-rw-r--r-- | tests/unit/gui/test-gui-color.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/gui/test-gui-color.cpp b/tests/unit/gui/test-gui-color.cpp index ecf3f0951..2505c2f92 100644 --- a/tests/unit/gui/test-gui-color.cpp +++ b/tests/unit/gui/test-gui-color.cpp @@ -192,6 +192,10 @@ TEST(GuiColor, GetCustom) GUI_COLOR_BAR_BG_CHAR); STRCMP_EQUAL(string, gui_color_get_custom ("bar_bg")); + /* only delimiter (no-op) */ + STRCMP_EQUAL("", gui_color_get_custom (",")); + STRCMP_EQUAL("", gui_color_get_custom (":")); + /* fg color */ snprintf (string, sizeof (string), "%c%c09", @@ -199,6 +203,14 @@ TEST(GuiColor, GetCustom) GUI_COLOR_FG_CHAR); STRCMP_EQUAL(string, gui_color_get_custom ("blue")); + /* fg color, delimiter and no bg color */ + snprintf (string, sizeof (string), + "%c%c09", + GUI_COLOR_COLOR_CHAR, + GUI_COLOR_FG_CHAR); + STRCMP_EQUAL(string, gui_color_get_custom ("blue,")); + STRCMP_EQUAL(string, gui_color_get_custom ("blue:")); + /* bg color */ snprintf (string, sizeof (string), "%c%c09", |