summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/gui/test-gui-color.cpp12
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 40e98393e..d2f618429 100644
--- a/tests/unit/gui/test-gui-color.cpp
+++ b/tests/unit/gui/test-gui-color.cpp
@@ -791,6 +791,12 @@ TEST(GuiColor, EncodeAnsi)
gui_color_get_custom ("-underline"));
WEE_CHECK_ENCODE_ANSI("test_" "\x1B[4m" "underline" "\x1B[24m" "_end", string);
+ /* text color: WeeChat: "default" -> ANSI: 39 (default fg color) */
+ snprintf (string, sizeof (string),
+ "test_" "%s" "default",
+ gui_color_get_custom ("default"));
+ WEE_CHECK_ENCODE_ANSI("test_" "\x1B[39m" "default", string);
+
/* text color */
snprintf (string, sizeof (string),
"test_" "%s" "blue",
@@ -809,6 +815,12 @@ TEST(GuiColor, EncodeAnsi)
gui_color_get_custom ("214"));
WEE_CHECK_ENCODE_ANSI("test_" "\x1B[38;5;214m" "214", string);
+ /* background color: WeeChat: "default" -> ANSI: 49 (default bg color) */
+ snprintf (string, sizeof (string),
+ "test_" "%s" "bg_default",
+ gui_color_get_custom (",default"));
+ WEE_CHECK_ENCODE_ANSI("test_" "\x1B[49m" "bg_default", string);
+
/* background color */
snprintf (string, sizeof (string),
"test_" "%s" "bg_red",