diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-18 01:43:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-18 01:43:00 +0000 |
commit | e2ad92a075bdcbffcae9afbb7dab9918f690fa14 (patch) | |
tree | 93080cd931ecdee3240a3b327c482da93d15b80e /test | |
parent | 90e812e81be93946a63f613e08e99a2508e39aa2 (diff) | |
download | ruby-e2ad92a075bdcbffcae9afbb7dab9918f690fa14.tar.gz |
ext/readline/readline.c: [Bug #6601]
* ext/readline/readline.c (readline_getc): deal with ESC just followed
by ASCII as meta prefix in incremental search mode. based on the
patch from rctay (Tay Ray Chuan) at [ruby-core:45682]. [Bug #6601]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/readline/test_readline.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb index 7f00b10721..3352eb19da 100644 --- a/test/readline/test_readline.rb +++ b/test/readline/test_readline.rb @@ -399,6 +399,21 @@ class TestReadline < Test::Unit::TestCase end end if !/EditLine/n.match(Readline::VERSION) + def test_input_metachar + bug6601 = '[ruby-core:45682]' + Readline::HISTORY << "hello" + wo = nil + line = with_pipe do |r, w| + wo = w.dup + wo.write("\C-re\ef\n") + end + assert_equal("hello", line, bug6601) + ensure + wo.close + with_pipe {|r, w| w.write("\C-a\C-k\n")} # clear line_buffer + Readline::HISTORY.clear + end + private def replace_stdio(stdin_path, stdout_path) |