diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-14 06:43:50 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-14 06:43:50 +0000 |
commit | 095886b572ef84ec7615c3966da4e94ff96a5f50 (patch) | |
tree | 39c61da4403c4dc4ebc85e5ca46a0f99f86e6af6 /test/readline | |
parent | 4d426fc2e03078d583d5d573d4863415c3e3eb8d (diff) |
readline.c: initialize before rl_refresh_line
* ext/readline/readline.c (readline_s_refresh_line): initialize
before rl_refresh_line(), as some function make the internal
state non-clean but rl_refresh_line() does not re-initialize it.
[ruby-core:43957] [Bug #6232]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/readline')
-rw-r--r-- | test/readline/test_readline.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb index 3a5f972fcd..0c50a99bc9 100644 --- a/test/readline/test_readline.rb +++ b/test/readline/test_readline.rb @@ -448,6 +448,18 @@ class TestReadline < Test::Unit::TestCase Readline::HISTORY.clear end if !/EditLine/n.match(Readline::VERSION) + def test_refresh_line + bug6232 = '[ruby-core:43957] [Bug #6232] refresh_line after set_screen_size' + with_temp_stdio do |stdin, stdout| + replace_stdio(stdin.path, stdout.path) do + assert_ruby_status(%w[-rreadline -], <<-'end;', bug6232) + Readline.set_screen_size(40, 80) + Readline.refresh_line + end; + end + end + end if Readline.respond_to?(:refresh_line) + private def replace_stdio(stdin_path, stdout_path) |