1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/reline
st0012 36ca0e58b6 [ruby/reline] Use color name instead of code (integer) in dialog color APIs
As pointed out in the
[comment](https://github.com/ruby/reline/pull/413#issuecomment-1168033973),
the code is actually a control sequence and not only for colors.

To make the dialog color APIs safer to use, we should restrict its
usages and extract away the bg/fg concept from the input.

So in this commit, I made these changes:

1. The dialog_*_bg/fg_color APIs only takes and returns color names (symbol):
  - :black
  - :red
  - :green
  - :yellow
  - :blue
  - :magenta
  - :cyan
  - :white
2. Add additional dialog_*_bg/fg_color_sequence APIs to access the raw code.

https://github.com/ruby/reline/commit/b32a977766
2022-07-16 02:30:23 +09:00
..
windows
yamatanooroti [ruby/reline] Use "Bundler.require" to load Gemfile.lock in multiline_repl 2022-01-16 22:09:32 +09:00
helper.rb [ruby/reline] Fix test input_keys to handle "hankaku" characters correctly on Windows 2021-12-24 15:01:17 +09:00
test_config.rb [ruby/reline] Use color name instead of code (integer) in dialog color APIs 2022-07-16 02:30:23 +09:00
test_history.rb
test_key_actor_emacs.rb [ruby/reline] Use unix_line_discard when Ctrl-u is entered 2021-12-30 20:23:58 +09:00
test_key_actor_vi.rb [ruby/reline] Rename the wrong name "em-kill-line" with the correct name "unix-line-discard" 2021-12-24 18:23:28 +09:00
test_key_stroke.rb
test_kill_ring.rb
test_macro.rb
test_reline.rb [ruby/reline] Use color name instead of code (integer) in dialog color APIs 2022-07-16 02:30:23 +09:00
test_reline_key.rb
test_string_processing.rb
test_terminfo.rb [ruby/reline] Check capname of tigetstr/tigetflag/tigetnum 2022-01-02 11:44:07 +09:00
test_unicode.rb
test_within_pipe.rb Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00