diff options
author | aycabta <aycabta@gmail.com> | 2020-11-21 02:59:38 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-12-05 02:58:59 +0900 |
commit | 37a574b527f2c612be46ec8038ff52bf861bf82f (patch) | |
tree | 9d297d3907013582bc0aae9b80960e8e1d70f2d2 /test | |
parent | 2910684c45399eed4dcebda72637a37858b74a62 (diff) | |
download | ruby-37a574b527f2c612be46ec8038ff52bf861bf82f.tar.gz |
[ruby/reline] Drop prompt list cache when num of lines is changed
https://github.com/ruby/reline/commit/1959e22043
Diffstat (limited to 'test')
-rw-r--r-- | test/reline/yamatanooroti/test_rendering.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb index dea3e7ff47..a2af80768d 100644 --- a/test/reline/yamatanooroti/test_rendering.rb +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -398,6 +398,18 @@ begin EOC end + def test_prompt_list_caching + start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl --prompt-list-cache-timeout 10 --dynamic-prompt}, startup_message: 'Multiline REPL.') + write("def hoge\n 3\nend") + close + assert_screen(<<~EOC) + Multiline REPL. + [0000]> def hoge + [0001]> 3 + [0002]> end + EOC + end + private def write_inputrc(content) File.open(@inputrc_file, 'w') do |f| f.write content |