1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/readline/test_readline.rb (test_completion_proc_empty_result): rescue NoMemoryError.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-01-10 01:45:09 +00:00
parent 9fa668f34a
commit 7ef154f833

View file

@ -207,10 +207,10 @@ class TestReadline < Test::Unit::TestCase
with_temp_stdio do |stdin, stdout| with_temp_stdio do |stdin, stdout|
stdin.write("first\t") stdin.write("first\t")
stdin.flush stdin.flush
actual_text = nil
Readline.completion_proc = ->(text) {[]} Readline.completion_proc = ->(text) {[]}
line = replace_stdio(stdin.path, stdout.path) { line = nil
Readline.readline("> ") replace_stdio(stdin.path, stdout.path) {
assert_nothing_raised(NoMemoryError) {line = Readline.readline("> ")}
} }
assert_equal("first", line) assert_equal("first", line)
end end