diff options
author | aycabta <aycabta@gmail.com> | 2021-12-24 20:06:48 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-12-25 00:32:57 +0900 |
commit | b0db420b0e70753986d42579439acdd7ff0d9e95 (patch) | |
tree | d55f5934cac635dc01ac3297986575ac8954de0b /test | |
parent | 22cc2243f92ef09c10534412511a02ca8ccd45cb (diff) |
[ruby/reline] Escape newline(s) in prompt
https://github.com/ruby/reline/commit/b545459fca
Diffstat (limited to 'test')
-rw-r--r-- | test/reline/yamatanooroti/test_rendering.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb index 0d1100f70c..8ddf95c1ba 100644 --- a/test/reline/yamatanooroti/test_rendering.rb +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -1228,6 +1228,19 @@ begin EOC end + def test_prompt_with_newline + ENV['RELINE_TEST_PROMPT'] = "::\n> " + start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.') + write("def hoge\n 3\nend") + close + assert_screen(<<~'EOC') + Multiline REPL. + ::\n> def hoge + ::\n> 3 + ::\n> end + EOC + end + def write_inputrc(content) File.open(@inputrc_file, 'w') do |f| f.write content |