From 347a468c59106cfc716c1fbadfff4623e155da38 Mon Sep 17 00:00:00 2001 From: st0012 Date: Tue, 28 Jun 2022 14:08:50 +0100 Subject: [PATCH] Add tests for top-level dialog color APIs --- test/reline/test_reline.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/reline/test_reline.rb b/test/reline/test_reline.rb index 0d45c5da54..0201fb3a75 100644 --- a/test/reline/test_reline.rb +++ b/test/reline/test_reline.rb @@ -46,6 +46,23 @@ def test_completion_append_character Reline.completion_append_character = completion_append_character end + def test_dialog_color_configuration + # defaults + assert_equal(46, Reline.dialog_default_bg_color) + assert_equal(37, Reline.dialog_default_fg_color) + assert_equal(45, Reline.dialog_pointer_bg_color) + assert_equal(37, Reline.dialog_pointer_fg_color) + + Reline.dialog_default_bg_color = 40 + assert_equal(40, Reline.dialog_default_bg_color) + Reline.dialog_default_fg_color = 47 + assert_equal(47, Reline.dialog_default_fg_color) + Reline.dialog_pointer_bg_color = 37 + assert_equal(37, Reline.dialog_pointer_bg_color) + Reline.dialog_pointer_fg_color = 30 + assert_equal(30, Reline.dialog_pointer_fg_color) + end + def test_basic_word_break_characters basic_word_break_characters = Reline.basic_word_break_characters