1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Add tests for top-level dialog color APIs

https://github.com/ruby/reline/commit/347a468c59
This commit is contained in:
st0012 2022-06-28 14:08:50 +01:00 committed by git
parent 6423d32e3b
commit 2733c04967

View file

@ -46,6 +46,23 @@ class Reline::Test < Reline::TestCase
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