Bug #5802 » 0001-fix-typo-and-suppress-warning-assigned-but-unused-va.patch
test/readline/test_readline.rb | ||
---|---|---|
Readline.completion_proc = proc { |text|
|
||
actual_text = text
|
||
actual_point = Readline.point
|
||
actual_buffer_line = Readline.line_buffer
|
||
actual_line_buffer = Readline.line_buffer
|
||
stdin.write(" finish\n")
|
||
stdin.close
|
||
stdout.close
|
||
return ["complete"]
|
||
["complete"]
|
||
}
|
||
stdin.write("first second\t")
|
||
stdin.flush
|
||
line = replace_stdio(stdin.path, stdout.path) {
|
||
replace_stdio(stdin.path, stdout.path) {
|
||
Readline.readline("> ", false)
|
||
}
|
||
assert_equal("first second", actual_line_buffer)
|